setup typescript

This commit is contained in:
2025-10-09 20:51:25 -07:00
parent 71c0a6eb9e
commit 16da07c374
5 changed files with 2037 additions and 6 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

1994
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,21 @@
"name": "npm", "name": "npm",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "build": "tsup"
}, },
"keywords": [], "keywords": [
"author": "", "discord",
"license": "ISC", "api"
"type": "commonjs" ],
"author": "doqe",
"license": "MIT",
"type": "commonjs",
"devDependencies": {
"tsup": "^8.5.0",
"typescript": "^5.9.3"
}
} }

17
tsconfig.json Normal file
View File

@ -0,0 +1,17 @@
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"strictNullChecks": true,
"target": "ES2022",
"moduleResolution": "Node",
"module": "commonjs",
"declaration": true,
"isolatedModules": true,
"noEmit": true,
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules"]
}

10
tsup.config.ts Normal file
View File

@ -0,0 +1,10 @@
import {defineConfig} from 'tsup';
export default defineConfig({
format: ['cjs', 'esm'],
entry: ['./src/index.ts'],
dts: true,
shims: true,
skipNodeModulesBundle: true,
clean: true
})