This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
144 lines (114 loc) · 2.93 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
ESLINT=./node_modules/eslint/bin/eslint.js
NPM_CHECK_UPDATES=./node_modules/npm-check-updates/build/src/bin/cli.js
PRETTIER=./node_modules/prettier/bin-prettier.js
SEMANTIC_RELEASE=./node_modules/semantic-release/bin/semantic-release.js
SORT_PACKAGE_JSON=./node_modules/sort-package-json/cli.js
TURBO=./node_modules/turbo/bin/turbo
CUB=./packages/bep-117/bin/index.mjs
CHANGESET=./node_modules/@changesets/cli/bin.js
################################################################################
##### Generic ##################################################################
################################################################################
all: clean build format test
.PHONY: all
audit:
> ${TURBO} run audit
.PHONY: audit
bench:
> ${TURBO} run bench
.PHONY: bench
build:
> pnpm install
> ${TURBO} run build --force
.PHONY: build
changeset:
> ${CHANGESET}
.PHONY: changeset
clean:
> ${TURBO} run clean
.PHONY: clean
cloc:
> npx cloc packages
.PHONY: cloc
deps:
> ${NPM_CHECK_UPDATES} -u --target=latest
> ${TURBO} run deps:major
> pnpm i
.PHONY: deps
deps_commit: deps
> pnpm i
> git add -A
> git commit -s -m "chore: update dependencies" --no-verify
> git push
.PHONY: deps_commit
deps_list:
> node scripts/list-external-dependencies.mjs
.PHONY: deps
deps_check: build
> ${TURBO} run depcheck
.PHONY: deps_check
deps_check_dry:
> ${TURBO} run depcheck
.PHONY: deps_check
docs: build
> ${TURBO} run docs
> git add -A
> git commit -s -m "chore: rebuild documentation" --no-verify
> git push
.PHONY: docs
format_dry: prettier lint_root lint sort
> ${TURBO} run proto:format
.PHONY: format
format: format_dry
> git add -A
> git commit -s -m "style: resolve style guide violations" --no-verify
> git push
.PHONY: format
generate_smoke_workflow:
> node scripts/generate-smoke-workflow.js
> ${PRETTIER} --write "./**/*.yml"
.PHONY: generate_smoke_workflow
lint:
> ${TURBO} run lint
.PHONY: lint
lint_root:
> ${ESLINT} 'examples/**/*.mjs' --format=codeframe --config=config/eslintrc.js --fix
.PHONY: lint_root
prettier:
> ${PRETTIER} --cache --write "./**/*.{js,json,md,mjs,ts,yaml,yml}"
.PHONY: prettier
release: sanity
> ${CHANGESET} version
> ${CHANGESET} publish
.PHONY: release
sanity: build format_dry test
.PHONY: sanity
semantic_release:
> ${SEMANTIC_RELEASE}
.PHONY: semantic_release
snapshots: build
> rm -rf packages/**/snapshots
> make test
.PHONY: sort
sort:
> node scripts/sort-package-json.mjs "package.json" "packages/*/package.json"
.PHONY: sort
test:
> ${TURBO} run test
.PHONY: test
test_coverage:
> ${TURBO} run test:coverage
.PHONY: test_coverage
test_coverage_report:
> ${TURBO} run test:coverage:report
.PHONY: test_coverage_report