-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
71 lines (48 loc) · 1.08 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PATH := $(PWD)/node_modules/.bin:$(PATH)
all: lint dist test
# ESnext compilation
# ======================
dist:
rm -rf $@
babel lib -d $@
develop:
babel-node $@
# Code quality
# ============
lint:
standard ./lib/**/*.js ./test/**/*.js
test: dist
tape test/*.test.js | faucet
cover: dist
rm -rf coverage
babel-istanbul cover --report none --print detail tape test/*.test.js
cover-browse: dist
rm -rf coverage
babel-istanbul cover --report html tape test/*.test.js
open coverage/index.html
travis: lint cover
babel-istanbul report lcovonly
(cat coverage/lcov.info | coveralls) || exit 0
rm -rf coverage
# Publish package to npm
# @see npm/npm#3059
# =======================
publish: all
npm publish
# Release, publish
# ================
# "patch", "minor", "major", "prepatch",
# "preminor", "premajor", "prerelease"
VERS ?= "patch"
TAG ?= "latest"
release: all
npm version $(VERS) -m "Release %s"
npm publish --tag $(TAG)
git push --follow-tags
# Tools
# =====
rebuild:
rm -rf node_modules
npm install
.PHONY: dist develop test
.SILENT: dist develop cover travis