blob: 72ab852af8f47ada59c31188d6225542f25652ff (
plain)
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
|
all: build
clean:
@stack clean > /dev/null
@rm -r elm-stuff >/dev/null 2>&1 || true
install:
@stack setup
@elm package install --yes
# Watch
# -----
watch: watch-server watch-elm watch-js
watch-server:
@nodemon -e hs,conf --exec 'clear && make build-and-launch-server --silent' &
watch-elm:
@nodemon -e elm --exec 'clear && make build-elm --silent' &
watch-js:
@nodemon --watch src/client/js --exec 'make build-js --silent'
# Build and launch
# ----------------
build-and-launch-server: build-server kill-server launch-server
launch-server:
@stack exec sharedCost &
kill-server:
@killall sharedCost || :
# Build
# -----
.PHONY: build
build: build-server build-elm build-js
build-server:
@stack build || true
build-elm:
@elm make src/client/elm/Main.elm --output public/javascripts/client.js || true
build-js:
@cp src/client/js/main.js public/javascripts/main.js || true
|