# MooTools Core
[](https://travis-ci.org/mootools/mootools-core)
[](https://saucelabs.com/u/MooTools-Core)
---
This repository is for MooTools developers; not users.
All users should download MooTools from [MooTools.net](http://mootools.net/download "Download MooTools")
---
## Contribute
You are welcome to contribute to MooTools! What we ask of you:
a. __To report a bug:__
1. Create a [jsFiddle](http://jsfiddle.net/) with the minimal amount of code to reproduce the bug.
2. Create a [GitHub Issue](https://github.com/mootools/mootools-core/issues), and link to the jsFiddle.
b. __To fix a bug:__
1. Clone the repo.
2. Add a [spec](http://jasmine.github.io/1.3/introduction.html). ([example](http://jsfiddle.net/q7RgN/))
3. Fix the bug.
4. Build and run the specs.
5. Push to your GitHub fork.
6. Create Pull Request, and send Pull Request.
__Do try to contibute!__ This is a community project.
## Building & Testing
Current build process uses [Grunt](http://github.com/gruntjs), [Grunt MooTools Packager plugin](https://github.com/ibolmo/grunt-packager), and [Karma related repos](http://github.com/karma-runner/grunt-karma).
**By default**, the build process runs the tests (specs) relevant to the build. To build without testing see the `packager` build targets.
### Building MooTools _With_ Compatibility
This means `1.5.1` that is compatible with: `1.4.6`, `1.3.x`, `1.2.x`, and so on.
**Examples**
grunt # or
grunt packager:all # to only build the source
### Building MooTools _Without_ Compatibility
This means `1.5.1` **without** deprecated code in `1.4.6`, `1.3.x`, `1.2.x`, and so on.
``` js
'Proceed at your own risk'
See the changelog or the blog related to each version for migrating your code.
```
**Examples**
grunt nocompat # or
grunt packager:nocompat # to only build the source
### Advanced Building and Testing
See the [Gruntfile](https://github.com/mootools/mootools-core/blob/master/Gruntfile.js) and [MooTools packager](https://github.com/ibolmo/grunt-mootools-packager) for further options.
**Examples**
# with compat
grunt --file=Function # builds all deps on Core/Function, builds all Specs on Specs/Core/Function, runs karma
grunt --module=Class # builds all deps on Class *folder*, builds all Specs on Specs/Class *folder*
# without compat
grunt nocompat --file=Function # builds all deps on Core/Function, builds all Specs on Specs/Core/Function, runs karma
grunt nocompat --module=Class # builds all deps on Class *folder*, builds all Specs on Specs/Class *folder*
#### Removing Other Packager Blocks
You'll need to add a specific task to the Gruntfile. See [packager's documentation](https://github.com/ibolmo/grunt-mootools-packager) for more examples.
### Testing locally
I you want to test your local repo you need just some small steps. Follow these in order:
$ git clone https://github.com/mootools/mootools-core # clone the MooTools repo
$ cd mootools-core # get into the directory
$ npm install # install de testing tools
$ npm install grunt-cli -g # install the Grunt command line interface
$ grunt default # run the specs!
You can also change which browser to call in the Gruntfile.js.
__Note that__ _most browsers need to be closed when starting tests so Grunt-Karma opens and closes the browser. Otherwise they might not close on its own and fire a timeout error for inactivity._
Example:
continuous: {
browsers: ['PhantomJS', 'IE', 'Chrome', 'Firefox', 'Safari']
},
If the log is too long, or if you want to store it in a file you can do:
$ grunt > logs.txt # This will create a new file called logs.txt in the local directory
### Testing on Travis & Sauce Labs
Every new Build and Pull Request is now tested on [Travis](https://travis-ci.org/) and [Sauce Labs](https://saucelabs.com/). You can also open your own free account on [Travis](https://travis-ci.org/) and [Sauce Labs](https://saucelabs.com/) to test new code ideas there.
[Travis](https://travis-ci.org/) testing uses [PhantomJS](http://phantomjs.org/) which is a headless browser. When connected to [Sauce Labs](https://saucelabs.com/) then it is possible to choose any number of [different Browsers and Platforms](https://saucelabs.com/platforms). You will need in this case to change the login key so it will match your account.
To add new Browsers in [Sauce Labs](https://saucelabs.com/) testing you can do some changes in the __[Gruntfile.js](https://github.com/mootools/mootools-core/blob/master/Gruntfile.js)__:
- add a new browser to the custom launchers already in the Gruntfile.
customLaunchers: {
chrome_linux: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'linux'
},
- add the chosen browser to a task (max 3 browsers per task if you are using a free account):
sauce2: {
port: 9877,
browsers: [
'safari7',
'safari6',
'safari5_osx10_6'
],
These tasks can be chained so its possible to test more than 3 browsers on the same test. But not more than 3 parallel.
__Example of a task chain:__
(This will run [registered tasks](http://gruntjs.com/api/grunt.task)that have been defined in the steps described before.)
grunt.registerTask('default:travis', [
'clean',
'packager:all',
'packager:specs',
'karma:sauce1',
'karma:sauce2',
'karma:sauce3',
'karma:sauce4'
// 'karma:sauce5',
// 'karma:sauce6'
])
#### Browsers, Platforms, and More
This test suite is ready for Travis & SauceLabs.
You can also run locally.
Support:
- IE
- Firefox
- Safari
- Chrome
- Opera
- PhantomJS (headless browser)
## More Information
[See the MooTools Wiki for more information](http://github.com/mootools/mootools-core/wikis)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Mootools从Prototype.js中汲取了许多有益的设计理念,语法也和其极其类似。但它提供的功能要比Prototype.js多,整体设计也比Prototype.js要相对完善,功能更强大,比如增加了动画特效、拖放操作等等。总之,Mootools是一个非常优秀的Javascript框架,更多精髓部分等待你去发掘.
资源推荐
资源详情
资源评论































收起资源包目录





































































































共 109 条
- 1
- 2
资源评论

- yajsky2015-09-02不错。有我想要的东西。。
- wj192661652015-01-07公网突然不能下载了,还是免费的好啊!

dqsweet
- 粉丝: 87
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 信息化教学设计方案评价量规.doc
- 基于互联网+的党校档案管理问题分析.docx
- Delphi短信视频点播前台管理子.doc
- 一种基于图像处理的芯片自动开封算法设计.docx
- 基于Java开发平台的安全性措施.docx
- SolidWorks工程图转换成AutoCADDWG文件后字体不变的方法.doc
- 基于计算机技术的科技管理模式的现代化应用研究.docx
- 实验离散信号的DTFT和DFT及其FFT算法的应用.doc
- 新零售背景下网络零售平台创新模式探索.docx
- 什么是人工智能人工智能知识详解.docx
- C++课程设计方案系统和论文设计方案.docx
- 条高AutoCAD工程项目师绘图技巧.doc
- 基于FTTC的桃源步行街无线网络规划与设计.doc
- 通信工程实习总结.docx
- 某教学楼计算机网络系统集成设计方案.doc
- 基于单片机的十字路口交通灯方案设计书大学大学本科方案设计书(方案设计书).doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
