forked from shutterstock/rickshaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
95 lines (78 loc) · 2.42 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
83
84
85
86
87
88
89
90
91
92
93
94
95
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
D3=$(NODE_MODULES)/d3
JSDOM=$(NODE_MODULES)/jsdom
NODEUNIT=$(NODE_MODULES)/nodeunit
CSS_FILES=\
src/css/detail.css\
src/css/graph.css\
src/css/legend.css\
JS_FILES=\
src/helpers/startUMD.js\
src/js/Rickshaw.js\
src/js/Rickshaw.Class.js\
src/js/Rickshaw.Compat.ClassList.js\
src/js/Rickshaw.Graph.js\
src/js/Rickshaw.Fixtures.Color.js\
src/js/Rickshaw.Fixtures.RandomData.js\
src/js/Rickshaw.Fixtures.Time.js\
src/js/Rickshaw.Fixtures.Time.Local.js\
src/js/Rickshaw.Fixtures.Number.js\
src/js/Rickshaw.Color.Palette.js\
src/js/Rickshaw.Graph.Ajax.js\
src/js/Rickshaw.Graph.Annotate.js\
src/js/Rickshaw.Graph.Axis.Time.js\
src/js/Rickshaw.Graph.Axis.X.js\
src/js/Rickshaw.Graph.Axis.Y.js\
src/js/Rickshaw.Graph.Axis.Y.Scaled.js\
src/js/Rickshaw.Graph.Behavior.Series.Highlight.js\
src/js/Rickshaw.Graph.Behavior.Series.Order.js\
src/js/Rickshaw.Graph.Behavior.Series.Toggle.js\
src/js/Rickshaw.Graph.HoverDetail.js\
src/js/Rickshaw.Graph.JSONP.js\
src/js/Rickshaw.Graph.Legend.js\
src/js/Rickshaw.Graph.RangeSlider.js\
src/js/Rickshaw.Graph.RangeSlider.Preview.js\
src/js/Rickshaw.Graph.Renderer.js\
src/js/Rickshaw.Graph.Renderer.Line.js\
src/js/Rickshaw.Graph.Renderer.Stack.js\
src/js/Rickshaw.Graph.Renderer.Bar.js\
src/js/Rickshaw.Graph.Renderer.Area.js\
src/js/Rickshaw.Graph.Renderer.ScatterPlot.js\
src/js/Rickshaw.Graph.Renderer.Multi.js\
src/js/Rickshaw.Graph.Renderer.LinePlot.js\
src/js/Rickshaw.Graph.Smoother.js\
src/js/Rickshaw.Graph.Socketio.js\
src/js/Rickshaw.Series.js\
src/js/Rickshaw.Series.FixedDuration.js\
src/helpers/endUMD.js\
.PHONY: clean build
build: rickshaw.min.css rickshaw.min.js
clean:
rm -rf rickshaw.css rickshaw.js rickshaw.min.*
test: $(D3) $(JSDOM) $(NODEUNIT)
npm test
$(JS_HINT):
npm install jshint
$(CSS_MIN):
npm install clean-css
$(JS_MIN):
npm install uglify-js
$(D3):
npm install d3
$(JSDOM):
npm install jsdom
$(NODEUNIT):
npm install nodeunit
rickshaw.css: $(CSS_FILES)
cat $(CSS_FILES) > rickshaw.css
rickshaw.js: $(JS_FILES) $(JS_HINT)
$(JS_HINT) src/js
cat $(JS_FILES) > rickshaw.js
rickshaw.min.css: $(CSS_MIN) rickshaw.css
$(CSS_MIN) rickshaw.css > rickshaw.min.css
rickshaw.min.js: $(JS_MIN) rickshaw.js
$(JS_MIN) --reserved-names "\$$super" rickshaw.js > rickshaw.min.js