Skip to content
This repository
tree: e9e70af5a7
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 37 lines (27 sloc) 0.815 kb
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
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/

Something went wrong with that request. Please try again.