This repository has been archived by the owner on Dec 17, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (61 loc) · 1.67 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
73
74
75
76
77
78
79
80
81
82
NODE_PREFIX=$(shell npm prefix)
NODE_MODULES=$(NODE_PREFIX)/node_modules
CSS_MIN=$(NODE_MODULES)/.bin/cleancss
JS_MIN=$(NODE_MODULES)/.bin/uglifyjs
#JS_HINT=$(NODE_MODULES)/.bin/jshint
CSS_FILES=\
src/css/clizia.css\
src/css/stacked.css\
src/css/standard.css\
src/css/tealeaves.css\
src/css/horizon.css
JS_FILES=\
src/js/clizia.js\
src/js/utils.js\
src/js/graph.js\
src/js/graph/horizon.js\
src/js/graph/rickshaw.js\
src/js/graph/rickshaw/stacked.js\
src/js/graph/rickshaw/standard.js\
src/js/graph/rickshaw/slider.js\
src/js/graph/rickshaw/tealeaves.js
VENDOR_JS_FILES=\
vendor/jquery-1.10.2.min.js\
vendor/d3.v3.js\
vendor/d3.layout.min.js\
vendor/rickshaw.min.js\
vendor/bootstrap.min.js\
vendor/nanobar.js\
vendor/cubism.v1.js
VENDOR_CSS_FILES=\
vendor/rickshaw.min.css\
vendor/font-awesome.relative.min.css\
vendor/cubism.css
.PHONY: clean build
build: vendor_bundle.js vendor_bundle.css clizia.min.css clizia.min.js
clean:
rm -rf clizia.css clizia.js clizia.min.* vendor_bundle.*
#$(JS_HINT):
# npm install jshint
$(CSS_MIN):
npm install clean-css
$(JS_MIN):
npm install uglify-js
$(JSDOM):
npm install jsdom
$(NODEUNIT):
npm install nodeunit
clizia.css: $(CSS_FILES)
cat $(CSS_FILES) > clizia.css
vendor_bundle.css: $(VENDOR_CSS_FILES)
cat $(VENDOR_CSS_FILES) > vendor_bundle.css
vendor_bundle.js: $(VENDOR_JS_FILES)
cat $(VENDOR_JS_FILES) > vendor_bundle.js
#clizia.js: $(JS_FILES) $(JS_HINT)
clizia.js: $(JS_FILES)
# $(JS_HINT) src/js/*
cat $(JS_FILES) > clizia.js
clizia.min.css: $(CSS_MIN) clizia.css
$(CSS_MIN) clizia.css > clizia.min.css
clizia.min.js: $(JS_MIN) clizia.js
$(JS_MIN) --reserved-names "\$$super" clizia.js > clizia.min.js