-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 924 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
all:
@npm install -d
@cp scripts/githooks/* .git/hooks/
@chmod -R +x .git/hooks/
specs := $(shell find ./tests -name '*.js' ! -path "*node_modules/*" ! -path "*spm_modules/*" ! -path "*build/*")
reporter = spec
test:
./node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha -- -R ${reporter} -t 20000 ${specs} --inline-diffs
debug:
./node_modules/.bin/_mocha -R ${reporter} ${specs}
jsfiles := $(shell find ./ -name '*.js' ! -path "*template/*.js" ! -path "*theme/*.js" ! -path "*utils/tar.js" ! -path "*node_modules/*" ! -path "*cases/*" ! -path "*data/*" ! -path "*scripts/*" ! -path "*coverage/*" ! -path "*tests/build/*");
binfiles := $(shell find ./bin/* ! -path "*.iml");
lint:
@node_modules/.bin/jshint ${jsfiles}
@node_modules/.bin/jshint ${binfiles}
clean:
@rm -fr .build
@find tests -name '.build' -exec rm -fr {} +
@find tests -name 'dist' -exec rm -fr {} +
.PHONY: all test lint clean