-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
34 lines (23 loc) · 941 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
BIN=bin/jslint.js
SOURCES=$(shell find bin lib -name '*.js' ! -name 'jslint*.js' -print)
install:
npm i .
# omit 'test' because running all tests is side-effect of asking for coverage
prepublish: lint doc no-dos-endings check-coverage
lint: $(SOURCES)
node ./bin/jslint.js --edition=latest --this --terse $(SOURCES); echo
test:
./node_modules/.bin/mocha -u tdd
doc: man/jslint.1 doc/jslint.html
man/jslint.1: doc/jslint.md
mkdir -p man
./node_modules/.bin/marked-man $< > $@
doc/jslint.html: doc/jslint.md
./node_modules/.bin/marked-man --html $< > $@
no-dos-endings:
file $(SOURCES) | grep -v CRLF >/dev/null
cover: $(SOURCES)
./node_modules/.bin/istanbul cover -x "lib/jslint-*.js" --print=both ./node_modules/mocha/bin/_mocha -- -u tdd
check-coverage: cover
./node_modules/.bin/istanbul check-coverage --statements 90 --branches 90 --functions 90 --lines 90
.PHONY: install lint test doc no-dos-endings check-coverage