Skip to content

Contributing

Benjamin Albert edited this page Mar 23, 2017 · 7 revisions

Thank you for contributing to the jQuery UI Month Picker project and helping us make the plugin better for everyone!

This project uses Node.js, NPM, Grunt and Bower to facilitate development and testing.

Development environment setup

  1. Click the Fork button on the top right corner of the GitHub repo page to create a your own copy of the repo which you can push (write) to.

  2. Download and install the LTS version of Node.js and run the following commands from the project directory:

  3. Install dependencies required for development including Bower dependencies:

npm install

Running the unit tests

You can run the tests in any supported browser or from the terminal/command prompt.

To run the tests in a browser open the /test/test.html file in the browser you want to test/develop the plugin.

To run QUnit tests in a headless PhantomJS instance from you terminal:

Install grunt globally (might require sudo):

npm install grunt -g

cd to the project directory and run:

grunt test

Writing test

Add test code to the /test/test.js file and the and necessary HTML markup to /test/test.html.

You can also wait for the automated tests to complete to visually mess around with the plugin.

Preparing for a release

Preparing for a release should be done by the person who merges the pull request.

Make sure to bump the versions in:

  1. The VERSION property in the MonthPicker.js file.

  2. The license comment in the MonthPicker.js file.

  3. The version property in the package.json file.

  4. Run the QUnit tests in a headless PhantomJS instance and generate minified versions of the .js and .css sources if the tests pass:

grunt
  1. Add (or overwrite) all files in the demo folder in the master branch to the gh-pages branch and push the gh-pages branch to the origin remote (which is usually your fork on GitHub):
grunt gh-pages
  1. Create a new release on GitHub so users can install the new version from bower.