Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (32 sloc) 1.05 KB
SRC_DIR=.
TEST_DIR=tests
BIN_COFFEE=./node_modules/.bin/coffee
BIN_KARMA=./node_modules/.bin/karma
BIN_UGLIFYJS=./node_modules/.bin/uglifyjs
BIN_PHANTOMJS=$(HOME)/local/bin/phantomjs
.SUFFIXES: .coffee .js
.coffee.js:
$(BIN_COFFEE) -c $<
.SUFFIXES: .js .min.js
.js.min.js:
$(BIN_UGLIFYJS) --define PRODUCTION=0 -nc -m -o $@ $<
.SUFFIXES: .coffee .test.js
.coffee.test.js:
$(BIN_COFFEE) -b -c -p $< >$@
COFFEE = $(wildcard $(SRC_DIR)/*.coffee)
JS = $(COFFEE:.coffee=.js)
MINJS = $(JS:.js=.min.js)
TEST_COFFEE = $(wildcard $(TEST_DIR)/*.coffee)
TEST_JS = $(TEST_COFFEE:.coffee=.test.js)
all: js
PHANTOMJS_BIN=$(BIN_PHANTOMJS) $(BIN_KARMA) start tests/testConf.test.js --single-run
cat unicode_eastasianwidth.js >> angular-unicode_eastasianwidth.js
cat unicode_eastasianwidth.min.js >> angular-unicode_eastasianwidth.min.js
cp $(JS) $(MINJS) distributes
js: $(JS) $(MINJS) $(TEST_JS)
test: js
PHANTOMJS_BIN=$(BIN_PHANTOMJS) $(BIN_KARMA) start tests/testConf.test.js
clean:
find ./ -name .DS_Store -delete
rm -f $(JS) $(MINJS) $(TEST_JS)
.PHONY: all test clean