Merge pull request #570 from fmarier/makefile

Add a Makefile to make it easy to run the linter
This commit is contained in:
monicachew 2014-05-13 08:40:42 -07:00
Родитель 54d37418c4 62ecf0b052
Коммит ed629e802a
2 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -8,9 +8,13 @@ This contributors document should be the canonical place for answers to:
# Before submitting a pull request # 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. and make sure your changes are not adding any new warnings or errors.

10
Makefile Normal file
Просмотреть файл

@ -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