UNPKG

820 BPlain TextView Raw
1MAKEFLAGS += --warn-undefined-variables
2PATH := node_modules/.bin:$(PATH)
3SHELL := /bin/bash
4
5.SHELLFLAGS := -eu -o pipefail -c
6.DEFAULT_GOAL := all
7.DELETE_ON_ERROR:
8.SUFFIXES:
9
10version ?= patch
11
12node_modules: package.json
13 @npm prune
14 @npm install
15 @touch node_modules
16
17.PHONY: clean
18clean:
19 @$(RM) -fr node_modules
20 @$(RM) -fr npm-debug.log
21 @$(RM) -fr coverage
22
23.PHONY: test
24test: node_modules
25 tape test/index.js
26
27.PHONY: release
28release:
29 npm version $(version)
30 git push && git push --tags
31 npm publish
32
33.PHONY: coverage
34coverage: node_modules index.js test/index.js node_modules
35 @istanbul cover --report html --print detail ./test/index.js
36 @touch coverage
37
38.PHONY: coveralls
39coveralls: node_modules coverage
40 @istanbul report lcov && (cat coverage/lcov.info | coveralls)
41
42.PHONY: travis
43travis: test coveralls