Skip to content

Commit e753b37

Browse files
committed
chore: create Makefile for builds
Instead of defining build commands in package.json which is less readable and has no caching/parallelism.
1 parent 6f868b0 commit e753b37

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.PHONY: clean
2+
3+
docs: dist equiv-checker.html tsconfig.build.json
4+
npx typedoc --tsconfig tsconfig.build.json
5+
cp -r dist/ docs/dist/
6+
cp equiv-checker.html docs/
7+
8+
dist: src node_modules tsconfig.build.json
9+
npx tsc --project tsconfig.build.json
10+
npx tsc-alias
11+
12+
node_modules: package-lock.json
13+
npm ci
14+
15+
####################################################
16+
17+
clean:
18+
rm -rf dist/ docs/

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
"version": "0.0.0-development",
88
"type": "module",
99
"scripts": {
10-
"test": "vitest",
11-
"bench": "npm run build && 0x --output-dir prof",
12-
"build": "tsc --project tsconfig.build.json && tsc-alias",
13-
"build:docs": "npm run build && typedoc --tsconfig tsconfig.build.json && cp -r dist/ docs/dist/ && cp ./*.html docs/",
14-
"serve:docs": "http-server -p 8080 -o docs/"
10+
"test": "vitest run",
11+
"build": "make",
12+
"serve": "http-server -p 8080",
13+
"bench": "0x --output-dir prof"
1514
},
1615
"main": "./dist/index.js",
1716
"exports": {

0 commit comments

Comments
 (0)