-
Notifications
You must be signed in to change notification settings - Fork 45
/
Makefile
72 lines (61 loc) · 1.82 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
62
63
64
65
66
67
68
69
70
71
72
HEADER = make/header.js
FOOTER = make/footer.js
LIBITEMS = lib/underscore.js lib/moment.js lib/raphael.js
EXAMPLes = compiled/examples
OBJS = polychart2.js polychart2.min.js polychart2.standalone.js tests.js examples.js
all: polychart2 polychart2.min polychart2.standalone examples tests clean-folders
dev: polychart2 examples
lib: polychart2 clean-folders
production: polychart2.standalone
polychart2:
mkdir -p tmp
mkdir -p compiled
coffee --compile --output tmp/src/ src/
cat\
tmp/src/utils.js \
tmp/src/const.js \
tmp/src/error.js \
tmp/src/abstract.js\
tmp/src/paper.js \
tmp/src/mouse.js \
tmp/src/format.js \
tmp/src/type.js \
tmp/src/spec.js \
tmp/src/ajax.js \
tmp/src/parser.js \
tmp/src/coord.js \
tmp/src/domain.js \
tmp/src/tick.js \
tmp/src/title.js \
tmp/src/axis.js \
tmp/src/legend.js \
tmp/src/scale.js \
tmp/src/scaleset.js \
tmp/src/data.js \
tmp/src/dataprocess.js \
tmp/src/layer.js \
tmp/src/pane.js \
tmp/src/dim.js \
tmp/src/render.js \
tmp/src/interact.js \
tmp/src/facet.js \
tmp/src/pivot.js \
tmp/src/numeral.js \
tmp/src/event.js \
tmp/src/graph.js > tmp/polychart2.bare.js
cat $(HEADER) tmp/polychart2.bare.js $(FOOTER) > polychart2.js
polychart2.min: polychart2
python make/uglify.py --source=polychart2.js --dest=polychart2.min.js
polychart2.standalone: polychart2.min
awk 'FNR==1{print ";"}1' $(LIBITEMS) polychart2.min.js > polychart2.standalone.js
examples:
coffee --compile --output compiled/example/ example/
cat compiled/example/* > examples.js
tests:
coffee --compile --output compiled/test/ test/
cat compiled/test/* > tests.js
clean-folders:
-rm -r compiled || echo "Done removing compiled/" && false
-rm -r tmp || echo "Done removing tmp/" && false
clean: clean-folders
-rm $(OBJS)