-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 791 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
UGLIFY=npx uglifyjs
ROLLUP=npx rollup
WSC=./bin/wsc
WSI=./bin/wsi
all: dist/wonderscript.js dist/wonderscript/core.ws.js dist/wonderscript.min.js dist/wonderscript/core.ws.min.js
dist/wonderscript:
mkdir -p dist/wonderscript
dist/wonderscript/core.ws.js: dist/wonderscript
$(WSC) browser ./src/wonderscript/core.ws > dist/wonderscript/core.ws.js
dist/wonderscript/core.ws.min.js: dist/wonderscript/core.ws.js
$(UGLIFY) dist/wonderscript/core.ws.js > dist/wonderscript/core.ws.min.js
dist/wonderscript.js:
$(ROLLUP) -c
dist/wonderscript.min.js: dist/wonderscript.js
$(UGLIFY) dist/wonderscript.js > dist/wonderscript.min.js
clean:
rm -rf dist
deps:
npm install .
test:
@for file in $(shell find test -name '*.ws'); do \
$(WSI) $$file; \
done;
.PHONY: all clean deps test