Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 68 lines (55 sloc) 1.838 kb
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
NODE_PREFIX=$(shell npm prefix)
NODE_MODULES=$(NODE_PREFIX)/node_modules

CSS_MIN=$(NODE_MODULES)/.bin/cleancss
JS_MIN=$(NODE_MODULES)/.bin/uglifyjs

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.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.*

$(CSS_MIN):
npm install clean-css

$(JS_MIN):
npm install uglify-js

rickshaw.css:
cat $(CSS_FILES) > rickshaw.css

rickshaw.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
Something went wrong with that request. Please try again.