setup typescript
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
1994
package-lock.json
generated
Normal file
1994
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@ -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
17
tsconfig.json
Normal 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
10
tsup.config.ts
Normal 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
|
||||||
|
})
|
Reference in New Issue
Block a user