forked from hotoo/detector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (36 loc) · 819 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version = $(shell cat package.json | grep version | awk -F'"' '{print $$4}')
install:
@npm install
build:
@spm build
publish: build publish-doc
@npm publish
@git tag $(version)
@git push origin $(version)
publish-doc: clean
@spm doc build
@spm build --umd detector
@cp -r dist _site
@ghp-import _site
@git push origin gh-pages
watch:
@spm doc watch
clean:
@rm -fr _site
lint:
@./node_modules/eslint/bin/eslint.js ./detector.js ./tests/ ./bin/detector
test-cli:
@mocha -R spec --timeout 5000 tests/cli.test.js
test-npm:
@./node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
-- \
--harmony \
--reporter spec \
--timeout 2000 \
--inline-diffs \
./tests/*.js
test-spm:
@spm test
test: lint test-npm test-spm
.PHONY: build-doc publish-doc server clean test coverage