-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (61 loc) · 1.12 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
72
73
74
75
76
77
78
79
80
81
82
BIN = ./node_modules/.bin
NPM = npm --loglevel=error
#
# INSTALL
#
install: node_modules/
node_modules/: package.json
echo "> Installing ..."
$(NPM) --ignore-scripts install > /dev/null
touch node_modules/
#
# CLEAN
#
clean:
echo "> Cleaning ..."
rm -rf build/
mrproper: clean
echo "> Cleaning deep ..."
rm -rf node_modules/
#
# BUILD
#
build: clean install
echo "> Building ..."
$(BIN)/babel src/ --out-dir build/
build-watch: clean install
echo "> Building forever ..."
$(BIN)/babel src/ --out-dir build/ --watch
#
# TEST
#
lint: install
echo "> Linting ..."
$(BIN)/eslint src/
test: install
echo "> Testing ..."
$(BIN)/mocca
test-watch: install
echo "> Testing forever ..."
$(BIN)/mocca --watch
#
# PUBLISH
#
_publish : NODE_ENV ?= production
_publish: lint test build
publish-fix: _publish
$(BIN)/release-it --increment patch
publish-feature: _publish
$(BIN)/release-it --increment minor
publish-breaking: _publish
$(BIN)/release-it --increment major
#
# MAKEFILE
#
.PHONY: \
install \
clean mrproper \
build build-watch \
lint test test-watch \
publish-fix publish-feature publish-breaking
.SILENT: