forked from CardinalPath/gas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·36 lines (27 loc) · 815 Bytes
/
Makefile
File metadata and controls
executable file
·36 lines (27 loc) · 815 Bytes
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
UGLIFYJS = uglifyjs --ascii -v
JSHINT = jshint
COREJSFILES = src/helpers.js src/core.js
PLUGINS = $(wildcard src/plugins/*.js)
WRAPUP = src/wrapup.js
JSFILES = $(COREJSFILES) $(PLUGINS) $(WRAPUP)
TESTFILES = $(wildcard test/test_*.js)
.DEFAULT_GOAL := all
all: gas.js gas.core.js gas.min.js gas.core.min.js
gas.js: $(JSFILES)
# for debugging
# grep "console" $^
cat src/header.js > dist/$@
echo "(function(window, undefined) {" >> dist/$@
cat $^ >> dist/$@
echo "})(window);" >> dist/$@
gas.core.js: $(COREJSFILES) $(WRAPUP)
cat src/header.js > dist/$@
echo "(function(window, undefined) {" >> dist/$@
cat $^ >> dist/$@
echo "})(window);" >> dist/$@
gas.min.js: gas.js
$(UGLIFYJS) -o dist/$@ dist/$<
gas.core.min.js: gas.core.js
$(UGLIFYJS) -o dist/$@ dist/$<
lint: $(JSFILES)
$(JSHINT) src/