If you are submitting a bug, please create a jsfiddle demonstrating the issue.
To contribute, fork the library and install grunt and dependencies. You need node; use nvm or nenv to install it.
git clone https://github.com/moment/moment.git
cd moment
npm install -g grunt-cli
npm install
git checkout develop # all patches against develop branch, please!
grunt # this runs tests and jshint
- Pull requests to the
master
branch will be closed. Please submit all pull requests to thedevelop
branch. - Locale translations will not be merged without unit tests. See the British English unit tests for an example.
- Do not include the minified files in your pull request. Don't worry, we'll build them when we cut a release.
We use Grunt for managing the build. Here are some useful Grunt tasks:
grunt
The default task lints the code and runs the tests. You should make sure you do this before submitting a PR.grunt test
run the tests.grunt release
Build everything, including minified filesgrunt transpile:fr,ru
Build custom locale bundlesmoment-with-locales.custom.js
andlocales.custom.js
insidebuild/umd/min
containing just French and Russian.grunt size
Print size statistics.