This commit is contained in:
Cyanoure
2024-09-15 14:32:53 +02:00
parent d89a0fefbe
commit fca0f47fb0
3 changed files with 2210 additions and 2 deletions

2192
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,15 @@
{ {
"name": "app", "name": "app",
"version": "1.0.0", "version": "1.0.0",
"main": "index.ts", "main": "./dist/index.ts",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files":[
"dist"
],
"scripts": { "scripts": {
"start": "ts-node src/index.ts", "start": "ts-node src/index.ts",
"build": "tsc", "build": "tsup",
"postinstall": "npm run build" "postinstall": "npm run build"
}, },
"keywords": [], "keywords": [],
@ -13,6 +18,7 @@
"description": "", "description": "",
"devDependencies": { "devDependencies": {
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"tsup": "^8.2.4",
"typescript": "^5.6.2" "typescript": "^5.6.2"
} }
} }

10
tsup.config.ts Normal file
View File

@ -0,0 +1,10 @@
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"], // Build for commonJS and ESmodules
dts: true, // Generate declaration file (.d.ts)
splitting: false,
sourcemap: true,
clean: true,
});