-
Notifications
You must be signed in to change notification settings - Fork 138
/
Makefile
70 lines (48 loc) · 1.59 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
# BIN = node_modules/.bin
# DUO = $(BIN)/duo
# T = $(BIN)/duo-test -m test/api.js -R spec -P 8378
SRC = index.js $(shell find lib -type f -name '*.js')
# TESTS = $(wildcard test/*.test.js)
# 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)
# build: build/recurly.min.js
# build/recurly.js: index.js $(SRC) node_modules component.json
# @mkdir -p $(@D)
# @$(DUO) --use duo-babel --stdout --global recurly < $< > $@
# build/recurly.min.js: build/recurly.js
# @$(BIN)/uglifyjs $< --output $@
# build/test.js: TESTFILE = $(foreach test, $(TESTS), 'require("./$(test)");')
# build/test.js: $(TESTS)
# @echo $(TESTFILE) | $(DUO) --quiet --use duo-babel --development --type js --stdout > $@
# watch: unwatch node_modules
# @watchman watch-project .
# @watchman -j < .watchman-triggers.json
# unwatch:
# @watchman watch-del .
# node_modules: package.json
# @npm install --silent
# clean:
# @rm -rf node_modules components/duo.json build
# .PHONY: test watch unwatch clean
BIN = node_modules/.bin
WEBPACK = $(BIN)/webpack
SERVER = $(BIN)/webpack-dev-server
server: build
@$(SERVER) --inline --hot
build: build/recurly.min.js
build/recurly.js: index.js $(SRC) node_modules
@mkdir -p $(@D)
@$(WEBPACK) --display-reasons --display-chunks -p
build/recurly.min.js: build/recurly.js
@$(BIN)/uglifyjs $< --output $@
node_modules: package.json
@npm install --silent
clean:
@rm -rf node_modules build
.PHONY: test watch clean