blob: 7991202f406ac14b4fe013ff70f41603c306fdcf (
plain)
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
|
BUN ?= bun
.DEFAULT_GOAL := help
.PHONY: help install test lint format build check clean
help:
@echo 'Targets:'
@echo ' install install the development dependencies'
@echo ' test run the test suite (bun test)'
@echo ' lint tsc --noEmit + prettier --check (read-only)'
@echo ' format apply prettier (writes)'
@echo ' build bundle to dist/ and emit type declarations'
@echo ' check lint + test + build, in that order'
@echo ' clean remove build artefacts'
node_modules: package.json
$(BUN) install
@touch node_modules
install: node_modules
test: node_modules
$(BUN) test
lint: node_modules
$(BUN) x tsc -p tsconfig.json
$(BUN) x prettier --check .
format: node_modules
$(BUN) x prettier --write .
build: node_modules
rm -rf dist
$(BUN) run build
check: lint test build
clean:
rm -rf dist
|