Coder Social home page Coder Social logo

mootools-core's Introduction

MooTools Core

Build Status

Selenium Test Status


This repository is for MooTools developers; not users. All users should download MooTools from MooTools.net


Contribute

You are welcome to contribute to MooTools! What we ask of you:

a. To report a bug:

  1. Create a jsFiddle with the minimal amount of code to reproduce the bug.
  2. Create a GitHub Issue, and link to the jsFiddle.

b. To fix a bug:

  1. Clone the repo.
  2. Add a spec. (example)
  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, Grunt MooTools Packager plugin, and Karma related repos.

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.

'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 and 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 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 and Sauce Labs. You can also open your own free account on Travis and Sauce Labs to test new code ideas there.

Travis testing uses PhantomJS which is a headless browser. When connected to Sauce Labs then it is possible to choose any number of different Browsers and 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 testing you can do some changes in the 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 tasksthat 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

mootools-core's People

Contributors

cpojer avatar ibolmo avatar kamicane avatar kassens avatar anutron avatar fabiomcosta avatar sergiocrisostomo avatar arian avatar subtlegradient avatar timwienk avatar appden avatar fakedarren avatar gcheung55 avatar kentaromiura avatar darkwing avatar 3n avatar tomocchino avatar gonchuki avatar w00fz avatar eerne avatar ibolmotest avatar sebmarkbage avatar dimitarchristoff avatar okolvik avatar barryvan avatar ccampbell avatar thatmarvin avatar djahandarie avatar slik avatar umphy avatar

Watchers

James Cloos avatar Jake Scott avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.