forked from dr4fters/dr4ft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (39 loc) · 1.19 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
.PHONY: all install clean cards score js config
all: install cards score js
node := ${CURDIR}/node_modules
all_sets := ${CURDIR}/data/AllSets.json
traceur := ${node}/.bin/traceur
client_config := config.client.js
server_config := config.server.js
${traceur}: install
install:
npm install
mkdir -p public/lib
ln -sf ${node}/normalize.css/normalize.css public/lib
ln -sf ${node}/react/dist/react.js public/lib
ln -sf ${node}/engine.io-client/engine.io.js public/lib
ln -sf ${node}/traceur/bin/traceur.js public/lib
ln -sf ${node}/traceur/bin/traceur-runtime.js public/lib
ln -sf ${node}/ee/ee.js public/lib
ln -sf ${node}/utils/utils.js public/lib
touch public/lib/piwik.js
clean:
rm -f ${all_sets}
cards: ${all_sets}
node src/make cards
custom:
node src/make custom
${all_sets}:
curl -so ${all_sets} https://mtgjson.com/json/AllSets.json
score:
-node src/make score
js: ${traceur} ${all_sets} ${client_config} ${server_config}
${traceur} --out public/lib/app.js public/src/init.js
# "order-only" prerequisite
${client_config}: | ${client_config}.default
cp $| $@
${server_config}: | ${server_config}.default
cp $| $@
config: ${client_config} ${server_config}
run: js ${server_config}
node run