2015-02-27 00:00:50 +08:00
|
|
|
SHELL=/bin/bash
|
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@$(SHELL) ./scripts/check-node-canvas.sh
|
|
|
|
|
2012-07-10 00:56:09 +08:00
|
|
|
all:
|
2015-02-27 00:00:50 +08:00
|
|
|
@$(SHELL) ./scripts/install.sh
|
2012-07-10 00:56:09 +08:00
|
|
|
|
2012-07-10 21:56:40 +08:00
|
|
|
clean:
|
2017-02-08 02:55:37 +08:00
|
|
|
rm -rf node_modules/
|
2012-07-10 21:56:40 +08:00
|
|
|
|
2017-02-08 03:03:47 +08:00
|
|
|
shrinkwrap: clean
|
|
|
|
rm npm-shrinkwrap.json
|
|
|
|
npm install --no-shrinkwrap --production
|
|
|
|
npm prune
|
|
|
|
npm shrinkwrap
|
|
|
|
|
2013-11-14 23:21:40 +08:00
|
|
|
distclean: clean
|
|
|
|
rm config.status*
|
|
|
|
|
|
|
|
config.status--test:
|
2013-08-21 16:50:49 +08:00
|
|
|
./configure --environment=test
|
2012-07-20 23:31:10 +08:00
|
|
|
|
2013-11-14 23:21:40 +08:00
|
|
|
config/environments/test.js: config.status--test
|
|
|
|
./config.status--test
|
|
|
|
|
2015-09-17 05:18:38 +08:00
|
|
|
TEST_SUITE := $(shell find test/{acceptance,integration,unit} -name "*.js")
|
|
|
|
TEST_SUITE_UNIT := $(shell find test/unit -name "*.js")
|
|
|
|
TEST_SUITE_INTEGRATION := $(shell find test/integration -name "*.js")
|
|
|
|
TEST_SUITE_ACCEPTANCE := $(shell find test/acceptance -name "*.js")
|
|
|
|
|
2015-02-23 19:08:08 +08:00
|
|
|
test: config/environments/test.js
|
|
|
|
@echo "***tests***"
|
2015-09-17 05:18:38 +08:00
|
|
|
@$(SHELL) ./run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE)
|
2015-07-08 05:46:58 +08:00
|
|
|
|
2015-07-05 02:41:22 +08:00
|
|
|
test-unit: config/environments/test.js
|
|
|
|
@echo "***tests***"
|
2015-09-17 05:18:38 +08:00
|
|
|
@$(SHELL) ./run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_UNIT)
|
2015-07-05 02:41:22 +08:00
|
|
|
|
|
|
|
test-integration: config/environments/test.js
|
|
|
|
@echo "***tests***"
|
2015-09-17 05:18:38 +08:00
|
|
|
@$(SHELL) ./run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_INTEGRATION)
|
2015-07-05 02:41:22 +08:00
|
|
|
|
|
|
|
test-acceptance: config/environments/test.js
|
|
|
|
@echo "***tests***"
|
2015-09-17 05:18:38 +08:00
|
|
|
@$(SHELL) ./run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_ACCEPTANCE)
|
2015-07-05 02:41:22 +08:00
|
|
|
|
2015-03-16 06:37:03 +08:00
|
|
|
jshint:
|
|
|
|
@echo "***jshint***"
|
2015-04-28 00:08:55 +08:00
|
|
|
@./node_modules/.bin/jshint lib/ test/ app.js
|
2015-03-16 06:37:03 +08:00
|
|
|
|
2016-05-23 19:03:56 +08:00
|
|
|
test-all: test jshint
|
2015-03-16 07:38:29 +08:00
|
|
|
|
2015-03-23 21:05:29 +08:00
|
|
|
coverage:
|
|
|
|
@RUNTESTFLAGS=--with-coverage make test
|
|
|
|
|
2015-02-23 19:08:08 +08:00
|
|
|
check: test
|
2012-12-21 20:30:14 +08:00
|
|
|
|
2015-03-23 21:21:08 +08:00
|
|
|
.PHONY: pre-install test jshint coverage
|