-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (53 loc) · 1.27 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
LICENSE_CONFIG?="license-config.json"
LICENSE:
@echo "you must have a LICENSE file" 1>&2
exit 1
LICENSE_HEADER:
@echo "you must have a LICENSE_HEADER file" 1>&2
exit 1
.PHONY: pretty
pretty: node_modules/prettier
npm run format
.PHONY: lint-fix
lint-fix: node_modules/eslint
npm run lint:fix
node_modules/eslint:
npm ci
node_modules/mocha:
npm ci
node_modules/prettier:
npm ci
node_modules/typescript:
npm ci
node_modules/license-check-and-add:
npm ci
run-env-%:
export ENV=$* \
&& export NODE_PATH=$(DIR) \
&& cp $(PROJECT_ROOT)/env/$(ENV)/.env .env \
&& npm run start
.PHONY: test
test: node_modules/mocha
export APP_DISABLE_AUTO_START=true \
&& export ENV=test \
&& export NODE_PATH=$(shell pwd)/src \
&& npm test
.PHONY: test-all
test-all: test-format test-lint test-types test
.PHONY: test-format
test-format: node_modules/prettier
npm run test:format
.PHONY: test-lint
test-lint: node_modules/eslint
npm run test:lint
.PHONY: test-lint
test-types: node_modules/typescript
npm run test:types
node_modules/license-check-and-add:
npm ci
.PHONY: license
license: LICENSE_HEADER
npm run license:fix
.PHONY: license-deploy
license-deploy: node_modules/license-check-and-add LICENSE LICENSE_HEADER
LICENSE_CONFIG=${LICENSE_CONFIG} npm run license:deploy