diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10c770c..194ff5a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bae4ff8 --- /dev/null +++ b/Makefile @@ -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