Correct path to point to mootools
[mootools.git] / README.md
blobd0dbf1db86151a51cd88d1069902f52a62891f0b
1 # MooTools Core
3 [![Build Status](https://travis-ci.org/mootools/mootools-core.png?branch=master)](https://travis-ci.org/mootools/mootools-core)
5 This repository is for MooTools developers; not users.
6 All users should download MooTools from [MooTools.net](http://mootools.net/download "Download MooTools")
8 ---
9 ## Contribute
11 You are welcome to contribute to MooTools! What we ask of you:
13 a. __To report a bug:__
15    1. Crete a [jsFiddle](http://jsfiddle.net/) with the minimal amount of code to reproduce the bug.
16    2. Create a [Github Issue](https://github.com/mootools/mootools-core/issues), and link to the jsFiddle.
17     
18 b. __To fix a bug:__
20    1. Clone the repo.
21    2. Fix the bug.
22    3. Add a [spec](http://jasmine.github.io/1.3/introduction.html).
23    4. Build and run the specs.
24    5. Push to your Github fork.
25    6. Create Pull Request, and send Pull Request.
28 __Do try to contibute!__ This is a community project.
31 ## Building & Testing
33 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).
35 **By default**, the build process runs the tests (specs) relevant to the build. To build without testing see the `packager` build targets.
37 ### Building MooTools _With_ Compatibility
38 This means `1.4.6` that is compatible with: `1.3.x`, `1.2.x`, and so on. 
40 **Examples**
42         grunt               # or
43         grunt packager:all  # to only build the source
45 ### Building MooTools _Without_ Compatibility
46 This means `1.4.6` **without** deprecated code in `1.3.x`, `1.2.x`, and so on.
48 ``` js
49 'Proceed at your own risk'
50 See the changelog or the blog related to each version for migrating your code.
51 ```
53 **Examples**
55         grunt nocompat           # or
56         grunt packager:nocompat  # to only build the source
57         
59 ### Advanced Building and Testing
60 See the [Gruntfile](https://github.com/mootools/mootools-core/blob/1.4.6/Gruntfile.js) for further options.
62 **Examples**
63   
64         # with compat
65         grunt --file=Function    # builds all deps on Core/Function, builds all Specs on Specs/Core/Function, runs karma
66         grunt --module=Class     # builds all deps on Class *folder*, builds all Specs on Specs/Class *folder*
68         # without compat
69         grunt nocompat --file=Function    # builds all deps on Core/Function, builds all Specs on Specs/Core/Function, runs karma
70         grunt nocompat --module=Class     # builds all deps on Class *folder*, builds all Specs on Specs/Class *folder*
72 #### Removing Other Packager Blocks
73 You'll need to add a specific task to the Gruntfile. See [line 24](https://github.com/mootools/mootools-core/blob/master/Gruntfile.js#L46) for an example.
75 ### Testing locally 
77 I you want to test your local repo you need just some small steps. Follow these in order:
79     $ git clone https://github.com/mootools/mootools-core  # clone the MooTools repo
80     $ cd mootools-core                                     # get into the directory
81     $ npm install                                          # install de testing tools
82     $ npm install grunt-cli -g                             # install the Grunt command line interface
83     $ grunt default                                        # run the specs!
84     
86 You can also change which browser to call in the Gruntfile.js.     
87 __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._
89 Example:
91         continuous: {
92                 browsers: ['PhantomJS', 'IE', 'Chrome', 'Firefox', 'Safari']
93         },
94         
95 If the log is too long, or if you want to store it in a file you can do:
97     $ grunt > logs.txt   # This will create a new file called logs.txt in the local directory
98     
99 ### Testing on Travis & Sauce Labs
101 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.
103 [Travis](https://travis-ci.org/) testing uses [PhantomJS](http://phantomjs.org/) which is a virtual testing system. 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.
105 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)__:
107  - add a new browser to the custom launchers already in the Gruntfile.
109                 customLaunchers: {
110                         chrome_linux: {
111                                 base: 'SauceLabs',
112                                 browserName: 'chrome',
113                                 platform: 'linux'
114                         }, 
117  - add the chosen browser to a task (max 3 browsers per task if you are using a free account):
119                 sauce2: {
120                         port: 9877,
121                         browsers: [
122                                 'safari7',
123                                 'safari6',
124                                 'safari5_osx10_6'
125                         ],
127         These tasks can be chained so its possible to test more than 3 browsers on the same test. But not more than 3 paralel.
129 __Example of a task chain:__
130 (This will run [registered tasks](http://gruntjs.com/api/grunt.task)that have been defined in the steps described before.)
132                 grunt.registerTask('default:travis', [
133                         'clean',
134                         'packager:all',
135                         'packager:specs',
136                         'karma:sauce1',
137                         'karma:sauce2',
138                         'karma:sauce3',
139                         'karma:sauce4'
140                         // 'karma:sauce5',
141                         // 'karma:sauce6'
142                 ])
144 #### Browsers, Platforms, and More
146 This test suite is ready for Travis & SauceLabs.
147 You can also run locally.
149 Support:
151  - IE
152  - Firefox
153  - Safari
154  - Chrome
155  - Opera
156  - PhantomJS (virtual browser)
160 ## More Information
162 [See the MooTools Wiki for more information](http://github.com/mootools/mootools-core/wikis)