-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (26 loc) · 990 Bytes
/
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
STATIC=public/*.html public/css # public/images public/assets
all: build build/server.js
build/server.js: src/**/*.cljs shadow-cljs.edn node_modules
npx shadow-cljs release server --debug
git rev-parse HEAD | cut -b -8 > build/build-id.txt
build: src/**/* $(STATIC)
mkdir -p build/public
cp -LR --preserve=all $(STATIC) build/public
npx shadow-cljs release app
touch build
node_modules: package.json
npm i
touch node_modulessi
.PHONY: watch watcher server repl clean
server: node_modules
@echo "waiting for devserver.js to appear."
@rm -f devserver.js; until [ -f devserver.js -a -d .shadow-cljs ]; do sleep 1; done; echo "devserver.js appeared. starting."
@sleep 1 && while [ 1 ]; do DEV=1 node devserver.js; sleep 3; echo "restarting devserver.js"; done
watcher: node_modules
npx shadow-cljs watch server app
watch:
make -j2 watcher server
repl:
npx shadow-cljs cljs-repl app
clean:
rm -rf .shadow-cljs devserver.js server.js build node_modules package-lock.json