-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
66 lines (43 loc) · 880 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
PATH := $(PWD)/node_modules/.bin:$(PATH)
all: lint dist test
# ESnext compilation
# ======================
dist:
rm -rf $@
babel ./src -d $@
develop: dist
babel-node $@
# Code quality
# ============
lint:
eslint ./src ./test
test: lint
jest
cover:
jest --coverage
cover-browse: cover
opn ./coverage/lcov-report/index.html
coveralls: cover
(cat ./coverage/lcov.info | 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