koa-lite/Makefile

53 lines
873 B
Makefile
Raw Normal View History

SRC = lib/*.js
include node_modules/make-lint/index.mk
BIN = iojs
ifeq ($(findstring io.js, $(shell which node)),)
BIN = node
endif
ifeq (node, $(BIN))
2015-08-30 15:42:44 +00:00
FLAGS = --harmony
endif
REQUIRED = --require should --require should-http
2014-07-05 16:49:11 +00:00
TESTS = test/application \
test/context/* \
test/request/* \
test/response/* \
test/experimental/index.js
2014-07-05 16:49:11 +00:00
2013-08-17 07:15:57 +00:00
test:
@NODE_ENV=test $(BIN) $(FLAGS) \
./node_modules/.bin/_mocha \
$(REQUIRED) \
2014-07-05 16:49:11 +00:00
$(TESTS) \
--bail
test-cov:
@NODE_ENV=test $(BIN) $(FLAGS) \
./node_modules/.bin/istanbul cover \
2014-07-05 16:49:11 +00:00
./node_modules/.bin/_mocha \
-- -u exports \
$(REQUIRED) \
2014-07-05 16:49:11 +00:00
$(TESTS) \
--bail
test-travis:
@NODE_ENV=test $(BIN) $(FLAGS) \
./node_modules/.bin/istanbul cover \
2014-07-05 16:49:11 +00:00
./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
$(REQUIRED) \
2014-07-05 16:49:11 +00:00
$(TESTS) \
2013-08-17 07:15:57 +00:00
--bail
bench:
@$(MAKE) -C benchmarks
.PHONY: test bench