forked from hotoo/detector
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 803 Bytes
/
Makefile
File metadata and controls
47 lines (33 loc) · 803 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
version = $(shell cat package.json | grep version | awk -F'"' '{print $$4}')
install:
@spm install
@npm install
build:
@spm build
publish: build publish-doc
@spm publish
@npm publish
@git tag $(version)
@git push origin $(version)
build-doc: clean
@spm doc build
publish-doc: clean
@spm doc publish
watch:
@spm doc watch
clean:
@rm -fr _site
runner = _site/tests/runner.html
test-npm:
@mocha -R spec tests/detector-spec.js
@mocha -R spec tests/morerule-test.js
test-spm:
@spm test
test: test-npm test-spm
output = _site/coverage.html
coverage: build-doc
@rm -fr _site/src-cov
@jscoverage --encoding=utf8 src _site/src-cov
@mocha-browser ${runner}?cov -S -R html-cov > ${output}
@echo "Build coverage to ${output}"
.PHONY: build-doc publish-doc server clean test coverage