-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
51 lines (40 loc) · 1.07 KB
/
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
# paths
ESLINT = ./node_modules/eslint/bin/eslint.js
MOCHA = ./node_modules/mocha/bin/_mocha
BROWSERIFY = ./node_modules/browserify/bin/cmd.js
ISTANBUL = ./node_modules/istanbul/lib/cli.js
COVERALLS=./node_modules/coveralls/bin/coveralls.js
KARMA=./node_modules/karma/bin/karma
# test
test: eslint mocha cov karma
# eslint
eslint:
$(ESLINT) -c ./.eslintrc src/scripts/ test
# mocha
mocha:
$(MOCHA) ./test/module/ --compilers es6:babel/register
# karma
karma:
$(KARMA) start
# Tests for TravisCI
travistest: eslint mocha cov
$(KARMA) start --single-run
# build
build: browserify riot
# browserify
browserify:
$(BROWSERIFY) src/scripts/content_script.js -t babelify --outfile app/scripts/content_script.js
cp src/scripts/event_page.js app/scripts/event_page.js
cp src/scripts/popup.js app/scripts/popup.js
# riot
riot:
riot src/scripts/view app/scripts/view/all.js
# pack
pack:
zip -r mata-tag-analyzer.zip app/ manifest.json
# coveralls
coveralls:
cat ./coverage/lcov.info | $(COVERALLS)
# coverage
cov:
$(ISTANBUL) cover $(MOCHA) -- --compilers js:babel/register test/module/*