Files
world/book/node_modules/cp/Makefile
2025-05-12 05:38:44 +09:00

29 lines
538 B
Makefile

BIN := node_modules/.bin
NODE ?= node
SRC = $(wildcard *.js)
TEST = $(wildcard test/*.js)
test: NODE=$(BIN)/gnode
test: node_modules
$(NODE) $(BIN)/_mocha \
--reporter spec \
--require co-mocha \
$(NODE_FLAGS)
# coverage only available on 0.11
coverage: node_modules $(SRC) $(TEST)
$(NODE) --harmony-generators $(BIN)/istanbul cover \
$(BIN)/_mocha -- \
--require co-mocha \
--reporter spec
node_modules: package.json
@npm install
@touch $@
clean:
@rm -rf coverage test/fixtures/*copy*
.PHONY: test clean