-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
45 lines (34 loc) · 1.06 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
# $@ = target file
# $< = first dependency
# $^ = all dependencies
SHELL=/bin/bash
TESTS = test/*.test.js
REPORTER = spec
TIMEOUT = 20000
PATH := ./node_modules/.bin:$(PATH)
lint:
@eslint --fix lib test index.js
install:
@npm install . --registry=https://registry.npm.taobao.org
build:
@npm install browserify derequire -g --registry=https://registry.npm.taobao.org
@browserify -r ./index.js:aliyun-api-gateway --standalone APIGateWay | derequire > build/aliyun-api-gateway-standalone.js
doc:
@doxmate build -o out
test:
@mocha --reporter $(REPORTER) --timeout $(TIMEOUT) $(TESTS)
transcompile:
@babel lib/ -d es5/
test-es5: transcompile
@mocha --compilers js:babel-register -t $(TIMEOUT) -R spec $(TESTS)
test-cov:
@nyc --reporter=html --reporter=text mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
$(TESTS)
test-coveralls: lint transcompile
@nyc mocha --compilers js:babel-register -t $(TIMEOUT) -R spec $(TESTS)
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@nyc report --reporter=text-lcov | coveralls
test-all: test test-coveralls
.PHONY: test build