Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 40 lines (32 sloc) 1.074 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 37 38 39
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
Something went wrong with that request. Please try again.