forked from stamen/modestmaps-js
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
40 lines (33 loc) · 867 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
NODE_PATH ?= ./node_modules
JS_COMPILER = $(NODE_PATH)/uglify-js/bin/uglifyjs
JS_FILES = \
src/start.js \
src/utils.js \
src/point.js \
src/coordinate.js \
src/location.js \
src/extent.js \
src/transformation.js \
src/projection.js \
src/provider.js \
src/mouse.js \
src/touch.js \
src/callbacks.js \
src/requests.js \
src/layer.js \
src/map.js \
src/convenience.js \
src/end.js
VERSION = `cat VERSION`
all: update-version modestmaps.js modestmaps.min.js
modestmaps.min.js: modestmaps.js
rm -f modestmaps.min.js
$(JS_COMPILER) modestmaps.js > modestmaps.min.js
modestmaps.js: $(JS_FILES) Makefile
rm -f modestmaps.js
cat $(JS_FILES) | perl -pi -e "s/{VERSION}/$(VERSION)/g" > modestmaps.js
update-version:
perl -pi -e "s/\"version\": \"[^\"]+/\"version\": \"$(VERSION)/g" package.json
clean:
rm -f modestmaps.js
rm -f modestmaps.min.js