forked from square/crossfilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (34 loc) · 797 Bytes
/
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
.PHONY: test benchmark
all: crossfilter.min.js
crossfilter.js: \
src/identity.js \
src/permute.js \
src/bisect.js \
src/heap.js \
src/heapselect.js \
src/insertionsort.js \
src/quicksort.js \
src/array.js \
src/filter.js \
src/null.js \
src/zero.js \
src/reduce.js \
src/crossfilter.js \
package.json \
Makefile
%.min.js: %.js Makefile
@rm -f $@
node_modules/.bin/uglifyjs $< -c unsafe=true -m -o $@
%.js:
@rm -f $@
@echo '(function(exports){' > $@
@echo 'crossfilter.version = "'$(shell node -p 'require("./package.json").version')'";' >> $@
cat $(filter %.js,$^) >> $@
@echo '})(typeof exports !== '\'undefined\'' && exports || this);' >> $@
@chmod a-w $@
clean:
rm -f crossfilter.js crossfilter.min.js
test: all
@npm test
benchmark: all
@node test/benchmark.js