Add a Makefile to make it easy to run the linter

This commit is contained in:
Francois Marier 2014-04-30 19:17:06 +12:00
Родитель e8a0112105
Коммит 62ecf0b052
2 изменённых файлов: 16 добавлений и 2 удалений

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

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

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