-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (29 loc) · 609 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
JS_COMPILER ?= ./node_modules/uglify-js/bin/uglifyjs
FILES = \
src/davy.js \
src/promise.js \
src/resolver.js \
src/extra.js \
src/util.js \
all: \
davy.js \
davy.min.js
davy.js: ${FILES}
@rm -f $@
@echo "(function(root){" > [email protected]
@echo "'use strict'" >> [email protected]
@cat $(filter %.js,$^) >> [email protected]
@echo "}(Function('return this')()))" >> [email protected]
@$(JS_COMPILER) [email protected] -b indent-level=2 -o $@
@chmod a-w $@
davy.min.js: davy.js
@rm -f $@
@$(JS_COMPILER) $< -c -m -o $@ \
--source-map [email protected] \
&& du -h $< $@
deps:
mkdir -p node_modules
npm install
clean:
rm -f davy*.js*