-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
103 lines (83 loc) · 2.38 KB
/
makefile
File metadata and controls
103 lines (83 loc) · 2.38 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Paths
build := typescript/tsconfig.build.json
dev := typescript/tsconfig.dev.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: start-offline
start-offline:
@echo "[INFO] Starting Offline Server"
@NODE_ENV=development \
serverless offline --stage devl
build:
@echo "[INFO] Building for production"
@NODE_ENV=production $(tsc) --p $(build)
deploy:
@echo "[INFO] Deploy"
@NODE_ENV=production \
AWS_ACCESS_KEY_ID=$(ACKI) \
AWS_SECRET_ACCESS_KEY=$(ASAK) \
serverless deploy --region us-east-1
remove:
@echo "[INFO] Remove"
@NODE_ENV=production \
AWS_ACCESS_KEY_ID=$(ACKI) \
AWS_SECRET_ACCESS_KEY=$(ASAK) \
serverless remove --region us-east-1
init-database-develop:
@echo "[INFO] Initiating Database"
@NODE_ENV=development \
DEVELOPMENT_AWS_ACCESS_KEY_ID=$(ACKI) \
DEVELOPMENT_AWS_SECRET_ACCESS_KEY=$(ASAK) \
$(ts_node) script/init-database.ts
delete-database-develop:
@echo "[INFO] Deleting Database"
@NODE_ENV=development \
DEVELOPMENT_AWS_ACCESS_KEY_ID=$(ACKI) \
DEVELOPMENT_AWS_SECRET_ACCESS_KEY=$(ASAK) \
$(ts_node) script/delete-database.ts
init-database-production:
@echo "[INFO] Initiating Database Production"
@NODE_ENV=production \
DEVELOPMENT_AWS_ACCESS_KEY_ID=$(ACKI) \
DEVELOPMENT_AWS_SECRET_ACCESS_KEY=$(ASAK) \
$(ts_node) script/init-database.ts
run-script:
@echo "[INFO] Running Script $(SCRIPT)"
@NODE_ENV=development \
$(ts_node) script/$(SCRIPT).ts
run-script-production:
@echo "[INFO] Running Script $(SCRIPT) Production"
@NODE_ENV=production \
$(ts_node) script/$(SCRIPT).ts
tests:
@echo "[INFO] Testing with Mocha"
@NODE_ENV=test \
$(mocha) --config test/.mocharc.json
cov:
@echo "[INFO] Testing with Nyc and Mocha"
@NODE_ENV=test \
nyc $(mocha) --config test/.mocharc.json
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
install:
@echo "[INFO] Installing Development Dependencies"
@yarn install --production=false
install-prod:
@echo "[INFO] Installing Dependencies"
@yarn install --production=true
outdated: install
@echo "[INFO] Checking Outdated Dependencies"
@yarn outdated
ci: tests lint build