1
0
mirror of https://github.com/d3/d3.git synced 2026-01-25 15:24:06 +00:00
d3/Makefile
2014-06-30 13:03:12 -04:00

37 lines
686 B
Makefile

GENERATED_FILES = \
d3.js \
d3.min.js \
bower.json \
component.json
all: $(GENERATED_FILES)
.PHONY: clean all test
test:
@npm test
src/start.js: package.json bin/start
bin/start > $@
test/data/sample-big.csv:
echo 'a,b,c,d,e,f,g,h,i,j' > $@
for i in {1..100000}; do echo '0,1,2,3,4,5,6,7,8,9' >> $@; done
d3.js: $(shell node_modules/.bin/smash --ignore-missing --list src/d3.js) package.json
@rm -f $@
node_modules/.bin/smash src/d3.js | node_modules/.bin/uglifyjs - -b indent-level=2 -o $@
@chmod a-w $@
d3.min.js: d3.js bin/uglify
@rm -f $@
bin/uglify $< > $@
%.json: bin/% package.json
@rm -f $@
bin/$* > $@
@chmod a-w $@
clean:
rm -f -- $(GENERATED_FILES)