nodemon 监听并使用 esbuild 作为 node runtime
, 支持 TypeScript
、ESNext
.
Warning
已经弃用! 请使用 tsx 代替此工具 :>
# 处理 CJS 模块 v2.0.0 +
npx @wuxh/run index.ts
# 1.0.1 使用 npx -p @wuxh/run emrun index.ts
# 处理 ESM 模块
npx -p @wuxh/run emrun index.ts
npm i @wuxh/run -g
# enrun index.ts # CJS
# emrun index.ts # ESM
- enrun: Node in CJS mode - by esbuild-register
- emrun: Node in ESM mode - by esbuild-node-loader
npm i @wuxh/run -D
CJS
{
"scripts": {
"start": "enrun index.ts",
},
"devDependencies": {
"@wuxh/run": "*"
}
}
ESM
{
+ "type": "module",
"scripts": {
- "start": "enrun index.ts",
+ "start": "emrun index.ts",
}
}
npm start
npx -p @wuxh/run enrun index.ts --nodemon='-w ./index.ts'
- 自
v2.0.0
开始:esnrun
重命名为enrun
esmrun
重命名为emrun