-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (58 loc) · 1.77 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
83
-include .env
export
ESLINT ?= npx eslint
YARN ?= npx yarn
.PHONY: install
stamp-yarn install:
$(YARN) install
# Install pre commit hook
$(YARN) husky install
touch stamp-yarn
clean-dist:
rm -Rf dist/
.PHONY: clean
clean: clean-dist
rm -f stamp-yarn
rm -Rf node_modules/
.PHONY: eslint
eslint: stamp-yarn
$(ESLINT) ./src
.PHONY: check
check:: stamp-yarn eslint
$(YARN) run test
.PHONY: bundle
bundle: stamp-yarn
$(YARN) run build
# If you want to release on GitHub, make sure to have a .env file with a GITHUB_TOKEN.
# Also see:
# https://github.com/settings/tokens
# and https://github.com/release-it/release-it/blob/master/docs/github-releases.md#automated
.PHONY: release-major
release-major: check
npx release-it major && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \
git checkout CHANGES.md
.PHONY: release-minor
release-minor: check
npx release-it minor && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \
git checkout CHANGES.md
.PHONY: release-patch
release-patch: check
npx release-it patch && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \
git checkout CHANGES.md
.PHONY: prerelease-alpha
prerelease-alpha: clean install
npx release-it --preRelease=alpha && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \
git checkout CHANGES.md
.PHONY: prerelease-beta
prerelease-beta: clean install
npx release-it --preRelease=beta && \
npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \
git checkout CHANGES.md
.PHONY: serve
serve: stamp-yarn
$(YARN) run start
#