-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (59 loc) · 2.01 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SOURCES = *.js
TESTS = test/*.test.js
# ==============================================================================
# Packaging
# ==============================================================================
build-browserify:
mkdir -p build
browserify -t deamdify null.js -o build/bundle.js
build-component: components
component build -u component-amd
components:
component install
# ==============================================================================
# Tests
# ==============================================================================
CHROME = open -a "Google Chrome"
FIREFOX = open -a "Firefox"
SAFARI = open -a "Safari"
PHANTOMJS = phantomjs
MOCHA_PHANTOMJS = ./node_modules/.bin/mocha-phantomjs
WWW_TESTS = test/www/index.html
test: test-phantomjs
test-chrome: test/www/js/lib
$(CHROME) $(WWW_TESTS)
test-firefox: test/www/js/lib
$(FIREFOX) $(WWW_TESTS)
test-safari: test/www/js/lib
$(SAFARI) $(WWW_TESTS)
test-phantomjs: node_modules test/www/js/lib
$(MOCHA_PHANTOMJS) $(WWW_TESTS)
# Prior to running tests on Sauce Labs, ensure that a local server is listening
# and Sauce Connect is tunneling requests to it.
#
# $ java -jar Sauce-Connect.jar $SAUCE_LABS_USERNAME $SAUCE_LABS_ACCESS_KEY
# $ node test/auto/server.js
#
test-saucelabs: node_modules test/www/js/lib
clear && node test/auto/terminal-saucelabs.js
test/www/js/lib:
cd test/www && volo add -nostamp
node_modules:
npm install
# ==============================================================================
# Code Quality
# ==============================================================================
JSHINT = jshint
hint: lint
lint:
$(JSHINT) $(SOURCES)
# ==============================================================================
# Clean
# ==============================================================================
clean:
rm -rf build
clobber: clean
rm -rf node_modules
rm -rf components
rm -rf test/www/js/lib
.PHONY: test test-chrome test-firefox test-safari test-phantomjs test-cloud test-saucelabs hint lint