forked from validatorjs/validator.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 695 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
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: node_modules
node_modules:
@echo "Installing dependencies.."
@npm install
coverage: dependencies
@$(NPM)/istanbul cover $(NPM)/_mocha -- --reporter spec
@open coverage/lcov-report/validator.js/validator.js.html
clean:
@rm -rf coverage
distclean: clean
@rm -rf node_modules
min: validator.min.js
%.min.js: %.js dependencies
@$(NPM)/uglifyjs --compress --mangle --comments '/Copyright/' $< > $@
check: test
deps: dependencies