avoid installing jake globally

Jake will be installed along with other devDependencies, so there is no need to install it one more time
This commit is contained in:
Andrzej 2017-09-22 20:00:56 +02:00 committed by Vladimir Agafonkin
parent 899bdd43de
commit 64825cef8f
2 changed files with 7 additions and 8 deletions

View File

@ -69,15 +69,13 @@ please consider submitting another pull request with the corresponding [document
### Setting up the Build System ### Setting up the Build System
The Leaflet build system uses [Node](http://nodejs.org/), and the [Jake](http://jakejs.com/) Javascript build tool. The Leaflet build system uses [Node](http://nodejs.org/), and the [Jake](http://jakejs.com/) Javascript build tool.
To set up the Leaflet build system, install Node then run the following commands in the project root to install Jake: To set up the Leaflet build system, install Node then run the following commands in the project root to install dependencies:
``` ```
npm install -g jake
npm install npm install
``` ```
or, if you prefer [`yarn`](https://yarnpkg.com/) over `npm`: or, if you prefer [`yarn`](https://yarnpkg.com/) over `npm`:
``` ```
yarn global add jake
yarn install yarn install
``` ```
@ -93,7 +91,7 @@ Please do not commit to the `master` branch, or your unrelated changes will go i
You should also follow the code style and whitespace conventions of the original codebase. You should also follow the code style and whitespace conventions of the original codebase.
In particular, use tabs for indentation and spaces for alignment. In particular, use tabs for indentation and spaces for alignment.
Before committing your changes, run `jake lint` to catch any JS errors in the code and fix them. Before committing your changes, run `npm run lint` to catch any JS errors in the code and fix them.
If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js` If you add any new files to the Leaflet source, make sure to also add them to `build/deps.js`
so that the build system knows about them. so that the build system knows about them.
@ -127,13 +125,13 @@ install [PhantomJS](http://phantomjs.org/) (and make sure it's in your `PATH`),
then run: then run:
``` ```
jake test npm run test
``` ```
To run all the tests in actual browsers at the same time, you can do: To run all the tests in actual browsers at the same time, you can do:
``` ```
jake test --ff --chrome --safari --ie npm run test -- --ff --chrome --safari --ie
``` ```
To run the tests in a browser manually, open `spec/index.html`. To run the tests in a browser manually, open `spec/index.html`.
@ -143,7 +141,7 @@ To run the tests in a browser manually, open `spec/index.html`.
To generate a detailed report about test coverage (which helps tremendously when working on test improvements), run: To generate a detailed report about test coverage (which helps tremendously when working on test improvements), run:
``` ```
jake test --cov npm run test -- --cov
``` ```
After that, open `coverage/<environment>/index.html` in a browser to see the report. After that, open `coverage/<environment>/index.html` in a browser to see the report.
@ -186,7 +184,7 @@ In order to generate the documentation, make sure that the development dependenc
are installed (run either `npm install` or `yarn install`), then just run are installed (run either `npm install` or `yarn install`), then just run
``` ```
jake docs npm run docs
``` ```
and you'll find a `.html` file in the `dist/` directory. and you'll find a `.html` file in the `dist/` directory.

View File

@ -36,6 +36,7 @@
"!dist/leaflet.zip" "!dist/leaflet.zip"
], ],
"scripts": { "scripts": {
"docs": "jake docs",
"test-jake": "jake test", "test-jake": "jake test",
"test": "jake test", "test": "jake test",
"build-jake": "jake build", "build-jake": "jake build",