Skip to content

Commit df5a778

Browse files
committed
chore: paths for tsconfig and bundler
1 parent 1d79daf commit df5a778

File tree

3 files changed

+42
-19
lines changed

3 files changed

+42
-19
lines changed

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
22
"name": "pagiko",
33
"version": "0.0.0",
4-
"devDependencies": {
5-
"@types/bun": "^1.2.21",
6-
"typescript": "^5.9.2"
7-
},
84
"dependencies": {
95
"@cantoo/pdf-lib": "^2.4.4",
106
"yoga-layout": "^3.2.1"
7+
},
8+
"devDependencies": {
9+
"@types/bun": "^1.2.21",
10+
"@vexcited/eslint-config": "^0.1.1",
11+
"eslint": "^9.35.0",
12+
"jiti": "^2.5.1",
13+
"tsup": "^8.5.0",
14+
"typescript": "^5.9.2"
1115
}
1216
}

tsconfig.json

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
22
"compilerOptions": {
3-
"lib": ["ESNext"],
43
"target": "ESNext",
5-
"module": "Preserve",
6-
"moduleDetection": "force",
7-
"moduleResolution": "bundler",
8-
"allowImportingTsExtensions": true,
9-
"verbatimModuleSyntax": true,
10-
"noEmit": true,
4+
5+
"emitDecoratorMetadata": true,
6+
"experimentalDecorators": true,
7+
"baseUrl": ".",
8+
"module": "ESNext",
9+
"moduleResolution": "Bundler",
10+
"paths": {
11+
"~/*": ["./src/*"],
12+
"@!/*": ["./tests/*"],
13+
"pagiko": ["./src/index.ts"]
14+
},
15+
1116
"strict": true,
12-
"skipLibCheck": true,
13-
"noFallthroughCasesInSwitch": true,
14-
"noUncheckedIndexedAccess": true,
15-
"noImplicitOverride": true,
16-
"noUnusedLocals": false,
17-
"noUnusedParameters": false,
18-
"noPropertyAccessFromIndexSignature": false
17+
"noEmit": true,
18+
19+
"allowSyntheticDefaultImports": true,
20+
"esModuleInterop": true,
21+
"isolatedModules": true,
22+
"skipLibCheck": true
1923
},
20-
"include": ["src", "examples"]
24+
25+
"include": ["src", "examples", "tests", "eslint.config.ts", "tsup.config.ts"],
26+
"exclude": ["node_modules", "dist"]
2127
}

tsup.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { defineConfig } from "tsup";
2+
3+
export default defineConfig({
4+
clean: true,
5+
dts: true,
6+
entry: ["src/index.ts"],
7+
format: ["cjs", "esm"],
8+
minify: "terser",
9+
outDir: "dist",
10+
sourcemap: true,
11+
splitting: false,
12+
treeshake: true
13+
});

0 commit comments

Comments
 (0)