From: Isaac Cambron Date: Sun, 6 Jul 2014 18:24:40 +0000 (-0400) Subject: Move readme simplification X-Git-Tag: 2.8.0~17^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dacad831e89977d3ac95ffa3c21b0ef2eb8d585;p=thirdparty%2Fmoment.git Move readme simplification * Rename readme.md to README.md because apparently that's the cool thing to do * Move more stuff into contributing.md. * Make CONTRIBUTING.md a little less yelly because the default branch thing seems to be working. --- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa2977d50..a2d027130 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,46 +1,36 @@ -All pull requests to the `master` branch will be closed. -======================================================== - -Please submit all pull requests to the `develop` branch. - -Language translations will not be merged without unit tests. -============================================================ - -See [the British english unit tests](https://github.com/moment/moment/blob/develop/test/lang/en-gb.js) for an example. - -Submitting Issues +Submitting issues ================= If you are submitting a bug, please create a [jsfiddle](http://jsfiddle.net/) demonstrating the issue. -Contributing -============ - -To contribute, fork the library and install grunt and dependencies. - - npm install -g grunt-cli - npm install - -You can add tests to the files in `/test/moment` or add a new test file if you are adding a new feature. - -To run the tests, do `grunt` to run all tests. - -To check the filesize, you can use `grunt size`. - -To minify all the files, use `grunt release`. **But please don't include minified files in pull requests.** We'll minify them when we release. - -If your code passes the unit tests (including the ones you wrote), submit a pull request. +Contributing code +================= -Submitting pull requests -======================== +To contribute, fork the library and install grunt and dependencies. You need [node](http://nodejs.org/); use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it. -Moment.js now uses [git-flow](https://github.com/nvie/gitflow). If you're not familiar with git-flow, please read up on it, you'll be glad you did. +```bash +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 +``` -When submitting new features, please create a new feature branch using `git flow feature start ` and submit the pull request to the `develop` branch. +Very important notes +==================== -Pull requests for enhancements for features should be submitted to the `develop` branch as well. + * **Pull pull requests to the `master` branch will be closed.** Please submit all pull requests to the `develop` branch. + * **Language translations will not be merged without unit tests.** See [the British English unit tests](https://github.com/moment/moment/blob/develop/test/lang/en-gb.js) for an example. + * **Do not include the minifiled files in your pull request.** Don't worrry, we'll build them when we cut a release. -When submitting a bugfix, please check if there is an existing bugfix branch. If the latest stable version is `1.5.0`, the bugfix branch would be `hotfix/1.5.1`. All pull requests for bug fixes should be on a `hotfix` branch, unless the bug fix depends on a new feature. +Grunt tasks +=========== -The `master` branch should always have the latest stable version. When bugfix or minor releases are needed, the develop/hotfix branch will be merged into master and released. +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 nodeunit:all` Just run the tests. + * `grunt release` Build everything, including minified files + * `grunt release --embedLanguages=fr,ru` Build everything, and also create `moment-with-customLangs.js` and `moment-with-customLangs.min.js` containing just French and Russian. + * `grunt size` Print size statistics. diff --git a/readme.md b/README.md similarity index 69% rename from readme.md rename to README.md index 32791468a..c5e9d3fa3 100644 --- a/readme.md +++ b/README.md @@ -1,4 +1,4 @@ -[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Develop build Status][travis-image]][travis-url] [![Master build Status][travis-image-master]][travis-url] +[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] A lightweight javascript date library for parsing, validating, manipulating, and formatting dates. @@ -26,23 +26,12 @@ Duplicate `Date` passed to `moment()` instead of referencing it. Changelog ========= -See [CHANGELOG.md](CHANGELOG.md). +See [the changelog](CHANGELOG.md). -For developers -============== +Contributing +============ -You need [node](http://nodejs.org/); use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it. - -Then, in your shell - -```bash -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 -``` +See [the contributing guide](CONTRIBUTING.md). License ======= @@ -58,4 +47,3 @@ Moment.js is freely distributable under the terms of the [MIT license](LICENSE). [travis-url]: http://travis-ci.org/moment/moment [travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat -[travis-image-master]: http://img.shields.io/travis/moment/moment/master.svg?style=flat