forked from validatorjs/validator.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (27 loc) · 729 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
NPM=./node_modules/.bin
test: dependencies
@$(NPM)/_mocha \
--reporter $(if $(or $(TEST),$(V)),spec,dot) \
--slow 600 --timeout 2000 \
--grep '$(TEST)'
lint: dependencies
@$(NPM)/jshint --config .jshintrc \
validator.js test/*.js
dependencies:
@if [ ! -d node_modules ]; then \
echo "Installing dependencies.."; \
npm install --silent; \
fi
coverage: dependencies
@$(NPM)/istanbul cover $(NPM)/_mocha -- --reporter spec
@open coverage/lcov-report/node-validator/validator.js.html
clean:
@rm -rf coverage
distclean: clean
@rm -rf node_modules
min:
@$(NPM)/uglifyjs --compress --mangle --comments all \
< validator.js > validator.min.js
check: test
deps: dependencies
.PHONY: dependencies clean min