Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 1.41 KB
/
Copy pathMakefile
File metadata and controls
51 lines (38 loc) · 1.41 KB
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
install:
@npm install
generate:
@echo 'generating rulesets'
@node ./generate-rulesets.ts
@echo 'generating data providers'
@node ./generate-data-providers.ts
@echo 'applying oxlint to generated files'
@make -i fix--generated && make -i fix--generated && make -i fix--generated
@./node_modules/.bin/oxlint --fix ./generated-src/*.ts ./tests/generated/*.ts
fix--generated:
@./node_modules/.bin/oxlint --quiet --silent --fix ./generated-src/*.ts ./tests/generated/*.ts
build: generate
@echo 'building from ./tsconfig.app.json'
@./node_modules/.bin/tsc --project ./tsconfig.app.json
lint--tsc:
@echo 'running syntax check'
@./node_modules/.bin/tsc --project ./tsconfig.app-check.json
lint--prettier:
@echo 'running prettier'
@./node_modules/.bin/prettier . --check
lint--oxlint:
@echo 'checking oxlint for all issues'
@./node_modules/.bin/oxlint
lint: lint--prettier lint--tsc lint--oxlint
.PHONY: tests
tests: build
@node ./tests.ts
.PHONY: coverage
coverage: lint coverage--skip-lint
coverage--skip-lint:
@node --experimental-test-coverage --test-coverage-include='${PWD}/src/**/*.ts' --test
coverage--lcov:
@node --experimental-test-coverage --test-coverage-include='${PWD}/src/**/*.ts' --test --test-reporter=lcov --test-reporter-destination=coverage/lcov.info
npm-prep: tests
@echo 'building from ./tsconfig.app-npm.json'
@./node_modules/.bin/tsc --project ./tsconfig.app-npm.json
@npm publish --dry-run