forked from keystonejs/keystone-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (32 loc) · 1.04 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
REPORTER = progress
ISTANBUL_CMD = node_modules/istanbul/lib/cli.js cover
JSXHINT_CMD = node_modules/jsxhint/cli.js
JSCS_CMD = node_modules/.bin/jscs
JSCS_REPORTER = console
JSCS_FILES = `find . -path "*.js" ! -path "./node_modules/*" \
! -path "./public/js/lib/*" \
! -path "./docs/*" \
! -path "./coverage/*"`
MOCHA_CMD = node_modules/mocha/bin/_mocha
JSHINT_REPORTER = node_modules/jshint-stylish/stylish.js
TESTS = test/*.js
default: test
test:
@NODE_ENV=test $(MOCHA_CMD) \
--require should \
--growl \
--reporter $(REPORTER)
jshint:
@echo "\nRunning JSHint ..."
@$(JSXHINT_CMD) --reporter $(JSHINT_REPORTER) .; true
jscs:
@echo "\nRunning JSCS ..."
@$(JSCS_CMD) $(JSCS_FILES) --reporter=$(JSCS_REPORTER); true
test-cov: clean
@$(ISTANBUL_CMD) $(MOCHA_CMD) -- --reporter $(REPORTER)
test-travis: test-spec
if test -n "$$CODECLIMATE_REPO_TOKEN"; then codeclimate < coverage/lcov.info; fi
# TODO explore generating documentation from a makefile task
clean:
rm -rf coverage
.PHONY: default lint test test-cov test-spec test-travis clean