-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
71 lines (55 loc) · 1.67 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
# Paths
build := typescript/tsconfig.build.json
# NPX functions
tsc := node_modules/.bin/tsc
ts_node := node_modules/.bin/ts-node
mocha := node_modules/.bin/mocha
eslint := node_modules/.bin/eslint
.IGNORE: clean-linux
main: dev
dev:
@echo "[INFO] Building for development"
@NODE_ENV=development $(tsc) --p $(dev)
build:
@echo "[INFO] Building for production"
@NODE_ENV=production $(tsc) --p $(build)
install:
@echo "[INFO] Installing Development Dependencies"
@yarn install --production=false
install-prod:
@echo "[INFO] Installing Production Dependencies"
@yarn install --production=true
outdated: install
@echo "[INFO] Checking Outdated Dependencies"
@yarn outdated
license: clean
@echo "[INFO] Sign files"
@NODE_ENV=production $(ts_node) script/license.ts
clean: clean-linux
@echo "[INFO] Cleaning release files"
@NODE_ENV=production $(ts_node) script/clean-app.ts
copy:
@echo "[INFO] Copying deployment"
@NODE_ENV=production $(ts_node) script/copy.ts
lint:
@echo "[INFO] Linting"
@NODE_ENV=production \
$(eslint) . --ext .ts,.tsx \
--config ./typescript/.eslintrc.json
lint-fix:
@echo "[INFO] Linting and Fixing"
@NODE_ENV=development \
$(eslint) . --ext .ts,.tsx \
--config ./typescript/.eslintrc.json --fix
clean-linux:
@echo "[INFO] Cleaning dist files"
@rm -rf dist
@rm -rf dist_script
@rm -rf .nyc_output
@rm -rf coverage
publish: install lint license build copy
@echo "[INFO] Publishing package"
@cd app && npm publish --access=public
publish-dry-run: install lint license build copy
@echo "[INFO] Publishing package (Dry Run)"
@cd app && npm publish --access=public --dry-run