зеркало из https://github.com/mozilla/lightbeam.git
Merge pull request #570 from fmarier/makefile
Add a Makefile to make it easy to run the linter
This commit is contained in:
Коммит
ed629e802a
|
@ -8,9 +8,13 @@ This contributors document should be the canonical place for answers to:
|
|||
|
||||
# Before submitting a pull request
|
||||
|
||||
To install jshint, simply `npm install jshint` from the root directory of the project. Then run like it like this:
|
||||
You can run the test suite like this:
|
||||
|
||||
node_modules/.bin/jshint data/*.js
|
||||
make test
|
||||
|
||||
In addition to running the tests, you should lint the code. To install jshint, simply `npm install jshint` from the root directory of the project. Then run like it like this:
|
||||
|
||||
make lint
|
||||
|
||||
and make sure your changes are not adding any new warnings or errors.
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
all:
|
||||
|
||||
lint:
|
||||
@test -x node_modules/.bin/jshint || (echo "You must install jshint first: npm install jshint" && exit 1)
|
||||
@node_modules/.bin/jshint data/*.js lib/*.js lib/*/*.js javascripts/*.js
|
||||
|
||||
test:
|
||||
cfx test
|
||||
|
||||
.PHONY: lint test
|
Загрузка…
Ссылка в новой задаче