- use tsx as typescript register & executor
- use tsup as transpiler from ts to esm
- use tsd as type test runner
- use tsdoc as document
- use Node.js v20 test runner
- use c8 for coverage
install dependency
$ npm i
run test suite
$ npm test
transpile ts to esm for release
$ npm build
1、run with node --inspect
$ npm run debug
in .vscode/launch.json
{
"name": "Attach to tsx",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
2、run directly in .vscode/launch.json
{
"name": "debug with tsx loader",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--loader",
"tsx"
],
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/src/main.ts",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
- Node.js v20
- TypeScript 5+
MIT @ npmstudy