|
1 |
| - ############## |
2 |
| -## Please note |
3 |
| -############## |
| 1 | +-include .env |
| 2 | +export |
| 3 | + |
| 4 | +ESLINT ?= npx eslint |
| 5 | +YARN ?= npx yarn |
| 6 | + |
| 7 | + |
| 8 | +.PHONY: install |
| 9 | +stamp-yarn install: |
| 10 | + $(YARN) install |
| 11 | + # Install pre commit hook |
| 12 | + $(YARN) husky install |
| 13 | + touch stamp-yarn |
| 14 | + |
| 15 | + |
| 16 | +clean-dist: |
| 17 | + rm -Rf dist/ |
| 18 | + |
| 19 | + |
| 20 | +.PHONY: clean |
| 21 | +clean: clean-dist |
| 22 | + rm -f stamp-yarn |
| 23 | + rm -Rf node_modules/ |
| 24 | + |
| 25 | + |
| 26 | +.PHONY: eslint |
| 27 | +eslint: stamp-yarn |
| 28 | + $(ESLINT) ./src |
| 29 | + |
| 30 | + |
| 31 | +.PHONY: check |
| 32 | +check:: stamp-yarn eslint |
| 33 | + $(YARN) run test |
| 34 | + |
| 35 | + |
| 36 | +.PHONY: bundle |
| 37 | +bundle: stamp-yarn |
| 38 | + $(YARN) run build |
4 | 39 |
|
5 |
| -# First, run ``make install``. |
6 |
| -# After that you have through Makefile extension all the other base targets available. |
7 | 40 |
|
8 | 41 | # If you want to release on GitHub, make sure to have a .env file with a GITHUB_TOKEN.
|
9 | 42 | # Also see:
|
10 | 43 | # https://github.com/settings/tokens
|
11 | 44 | # and https://github.com/release-it/release-it/blob/master/docs/github-releases.md#automated
|
12 | 45 |
|
13 | 46 |
|
14 |
| -# Include base Makefile |
15 |
| --include node_modules/@patternslib/dev/Makefile |
| 47 | +.PHONY: release-major |
| 48 | +release-major: check |
| 49 | + npx release-it major && \ |
| 50 | + npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \ |
| 51 | + git checkout CHANGES.md |
16 | 52 |
|
17 |
| -# Define the GITHUB_TOKEN in the .env file for usage with release-it. |
18 |
| --include .env |
19 |
| -export |
| 53 | +.PHONY: release-minor |
| 54 | +release-minor: check |
| 55 | + npx release-it minor && \ |
| 56 | + npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \ |
| 57 | + git checkout CHANGES.md |
20 | 58 |
|
| 59 | +.PHONY: release-patch |
| 60 | +release-patch: check |
| 61 | + npx release-it patch && \ |
| 62 | + npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \ |
| 63 | + git checkout CHANGES.md |
21 | 64 |
|
22 |
| -.PHONY: install |
23 |
| -stamp-yarn install: |
24 |
| - npx yarn install |
25 |
| - # Install pre commit hook |
26 |
| - npx yarn husky install |
27 |
| - touch stamp-yarn |
| 65 | +.PHONY: prerelease-alpha |
| 66 | +prerelease-alpha: clean install |
| 67 | + npx release-it --preRelease=alpha && \ |
| 68 | + npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \ |
| 69 | + git checkout CHANGES.md |
| 70 | + |
| 71 | +.PHONY: prerelease-beta |
| 72 | +prerelease-beta: clean install |
| 73 | + npx release-it --preRelease=beta && \ |
| 74 | + npx release-it --github.release --github.update --no-github.draft --no-increment --no-git --no-npm && \ |
| 75 | + git checkout CHANGES.md |
| 76 | + |
| 77 | + |
| 78 | +.PHONY: serve |
| 79 | +serve: stamp-yarn |
| 80 | + $(YARN) run start |
28 | 81 |
|
29 | 82 |
|
30 | 83 | #
|
0 commit comments