-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (59 loc) · 1.09 KB
/
Copy pathMakefile
File metadata and controls
74 lines (59 loc) · 1.09 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
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
#
# Binaries.
#
ESLINT = node_modules/.bin/eslint
JSFMT = node_modules/.bin/jsfmt
MOCHA = node_modules/.bin/mocha
ZUUL = node_modules/.bin/zuul
#
# Files.
#
SRCS = index.js
TESTS = test/index.js
#
# Options.
#
GREP ?=.
#
# Tasks.
#
# Install node packages.
node_modules: $(wildcard package.json node_modules/*/package.json)
@npm install
# Remove temporary files.
clean:
rm -rf *.log
.PHONY: clean
# Remove temporary and packaged files.
distclean: clean
rm -rf node_modules
.PHONY: distclean
# Format files.
fmt: node_modules
@$(JSFMT) --write $(SRCS) $(TESTS)
.PHONY: fmt
# Lint files.
lint: node_modules
@$(ESLINT) $(SRCS) $(TESTS)
.PHONY: lint
# Run perf tests.
perf: node_modules
@node perf/index.js
.PHONY: perf
# Run tests in node.
test: node_modules
@$(MOCHA) \
--ui bdd \
--reporter spec \
--grep "$(GREP)" \
$(TESTS)
.PHONY: test
.DEFAULT_GOAL = test
# Run tests in a Sauce Labs browser.
test-browser: node_modules
@$(ZUUL) -- $(TESTS)
.PHONY: test-browser
# Run tests in a local browser.
test-browser-local: node_modules
@$(ZUUL) --local -- $(TESTS)
.PHONY: test-browser-local