-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
62 lines (47 loc) · 1.57 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
idris2 = idris2
node = node
init: FORCE
test -d db || mkdir db
test -d build || mkdir build
test -d service || mkdir service
touch service/order-taking-service.js
typecheck: src order-taking-service.ipkg FORCE
$(idris2) --typecheck order-taking-service.ipkg --codegen node
FORCE:
watch:
while inotifywait -e close_write -r src; do $(idris2) --typecheck order-taking-service.ipkg; done
clean-lsp-log:
rm ~/.cache/nvim/lsp.log
clean:
$(idris2) --clean order-taking-service.ipkg
rm -r build
repl:
rlwrap $(idris2) --repl order-taking-service.ipkg --codegen node
nodejs:
$(idris2) --clean order-taking-service.ipkg
$(idris2) --build order-taking-service.ipkg --codegen node
drop-db:
rm -r db
init-db: init drop-db nodejs
mkdir db
touch db/product.db
touch db/order.db
rm service/order-taking-service.js
cp build/exec/order-taking-service service/order-taking-service.js
$(node) service/order-taking-service.js --init-db
start: init nodejs
rm service/order-taking-service.js
cp build/exec/order-taking-service service/order-taking-service.js
$(node) service/order-taking-service.js
start-opt: init nodejs
rm service/order-taking-service.js
cp build/exec/order-taking-service service/order-taking-service.js
npx google-closure-compiler service/order-taking-service.js \
--language_out=ES_2020 \
--isolation_mode=IIFE --module_resolution=NODE \
--assume_function_wrapper > service/order-taking-service-opt.js
$(node) service/order-taking-service-opt.js
restart:
$(node) service/order-taking-service.js
restart-opt:
$(node) service/order-taking-service-opt.js