-
Notifications
You must be signed in to change notification settings - Fork 138
/
Makefile
48 lines (33 loc) · 989 Bytes
/
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
# T = $(BIN)/duo-test -m test/api.js -R spec -P 8378
BIN = node_modules/.bin
WEBPACK = $(BIN)/webpack
KARMA = $(BIN)/karma
SERVER = $(BIN)/webpack-dev-server
SRC = index.js $(shell find lib -type f -name '*.js')
TESTS = $(wildcard test/*.test.js)
server: build
@$(SERVER) --inline --hot --port 8020
build: build/recurly.min.js
build/recurly.js: index.js $(SRC) node_modules
@mkdir -p $(@D)
@$(WEBPACK) --display-reasons --display-chunks
build/recurly.min.js: build/recurly.js
@$(WEBPACK) -p
build/test.js: $(SRC) $(TESTS)
@$(WEBPACK) --config webpack.test.config.js
test: build build/test.js
@$(KARMA) start karma.conf.js
test-sauce:
# test: test-phantomjs
# test-phantomjs: build build/test.js
# @$(T) phantomjs
# test-browser: build build/test.js
# @$(T) browser
# test-sauce: BROWSER ?= ie:9
# test-sauce: build build/test.js
# @$(T) saucelabs -b $(BROWSER)
node_modules: package.json
@npm install --silent
clean:
@rm -rf node_modules build
.PHONY: test clean