Skip to content

Commit 9f84c8c

Browse files
committed
build: Run tsc before build
1 parent 7814890 commit 9f84c8c

File tree

5 files changed

+31
-36
lines changed

5 files changed

+31
-36
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"node": ">=18"
4747
},
4848
"scripts": {
49-
"build": "npm run clean && rollup -c && npm run build-type",
50-
"build-type": "echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json && echo '{\"type\":\"module\"}' > lib/esm/package.json",
49+
"build": "npm run clean && tsc && rollup -c && npm run build-lib-packages",
50+
"build-lib-packages": "echo '{\"type\":\"commonjs\"}' > lib/cjs/package.json && echo '{\"type\":\"module\"}' > lib/esm/package.json",
5151
"clean": "rimraf ./lib",
5252
"lint": "eslint .",
5353
"format": "prettier --write .",

tsconfig.base.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

tsconfig.cjs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./lib/cjs"
55
}

tsconfig.esm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.base.json",
2+
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "./lib/esm"
55
}

tsconfig.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
{
2-
"extends": "./tsconfig.base.json",
32
"compilerOptions": {
4-
"outDir": "./lib"
5-
}
3+
/* dirs */
4+
"rootDir": "./src",
5+
"declarationDir": "./lib/types",
6+
"types": ["node"],
7+
/* module config */
8+
"target": "es2020",
9+
"lib": ["es2020", "es2022.error"],
10+
"resolveJsonModule": true,
11+
"esModuleInterop": true,
12+
"moduleResolution": "node",
13+
/* behaviour options */
14+
"strict": true,
15+
"allowJs": true,
16+
"allowSyntheticDefaultImports": true,
17+
"noFallthroughCasesInSwitch": true,
18+
"declaration": true,
19+
"sourceMap": true,
20+
"noImplicitReturns": true,
21+
"noImplicitOverride": true,
22+
"noUnusedLocals": true,
23+
"noUnusedParameters": true,
24+
"skipLibCheck": true,
25+
"forceConsistentCasingInFileNames": true,
26+
"noEmit": true
27+
},
28+
"include": ["src"],
29+
"exclude": ["node_modules", "lib"]
630
}

0 commit comments

Comments
 (0)