-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (53 loc) · 2.21 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
install:
@NODE_OPTIONS='' npm install
validate: lint build validate--skip-checks--update8 validate--skip-checks--version-1
validate--skip-checks--update8:
@npm run validate
validate--skip-checks--version-1:
@npm run validate--version-1
build:
@echo 'building from ./tsconfig.app.json'
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.app.json
clean:
@echo 'running ./clean.ts'
@./node_modules/.bin/ts-node ./clean.ts
generate: lint generate--skip-checks generate--post-build
generate--skip-checks: build generate--skip-checks--common generate--skip-checks--update8 generate--skip-checks--version-1
generate--skip-checks--common:
@echo 'running ./generate-common-types.ts'
@./node_modules/.bin/ts-node ./generate-common-types.ts
generate--skip-checks--update8:
@echo 'running ./discover-types.ts'
@./node_modules/.bin/ts-node ./discover-types.ts
generate--skip-checks--version-1:
@echo 'running ./discover-types--1.0.ts'
@./node_modules/.bin/ts-node ./discover-types--1.0.ts
generate--post-build:
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.generated-types-check.json
lint--tsc:
@echo 'running syntax check'
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.app-check.json
lint--prettier:
@echo 'running prettier'
@./node_modules/.bin/prettier . --check
lint--eslint:
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.eslint.json
@echo 'checking eslint for all issues with config'
@./node_modules/.bin/eslint --config eslint.config.js.mjs --cache './**/eslint.config*.mjs'
@echo 'checking eslint for all issues'
@./node_modules/.bin/eslint --cache './**/*.ts' --ignore-pattern 'generated-types'
lint: lint--prettier lint--tsc lint--eslint
.PHONY: tests
tests: build
@npm test
tests--only-unstaged: build
@./node_modules/.bin/ts-node ./tests--only-these.ts '$(shell git diff HEAD --name-only)'
.PHONY: coverage
coverage: build
@./node_modules/.bin/c8 npm test
coverage--only-unstaged: build
@./node_modules/.bin/c8 ./node_modules/.bin/ts-node ./tests--only-these.ts '$(shell git diff HEAD --name-only)'
npm-prep: tests
@echo 'building from ./tsconfig.app-npm.json'
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.app-npm.json
@npm publish --dry-run