-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
68 lines (45 loc) · 921 Bytes
/
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
PATH := $(PWD)/node_modules/.bin:$(PATH)
all: lint dist test
# ESnext compilation
# ======================
dist:
rm -rf $@
babel src -d $@
develop:
babel-node $@
# Code quality
# ============
lint:
eslint ./src ./test
test: lint dist
ava
cover: dist
nyc ava
cover-browse: dist cover
rm -rf coverage
nyc --reporter=html ava
opn coverage/index.html
coveralls: cover
(nyc report --reporter=text-lcov | coveralls) || exit 0
# 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