forked from shutterstock/rickshaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (60 loc) · 1.95 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
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/detail.css\
src/css/graph.css\
src/css/legend.css\
JS_FILES=\
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.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.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.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.Smoother.js\
src/js/Rickshaw.Graph.Unstacker.js\
src/js/Rickshaw.Series.js\
src/js/Rickshaw.Series.FixedDuration.js\
.PHONY: clean build
build: rickshaw.min.css rickshaw.min.js
clean:
rm -rf rickshaw.css rickshaw.js rickshaw.min.*
$(JS_HINT):
npm install jshint
$(CSS_MIN):
npm install clean-css
$(JS_MIN):
npm install uglify-js
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