This package has been deprecated

Author message:

It won't be maintained, use tsx instead.

@wuxh/run

2.0.1 • Public • Published

@wuxh/run

nodemon 监听并使用 esbuild 作为 node runtime, 支持 TypeScriptESNext.

使用

# 处理 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

本地安装

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

自定义 nodemon 配置

查看 nodemon 规则

npx -p @wuxh/run enrun index.ts --nodemon='-w ./index.ts'

Warn

  1. v2.0.0 开始:
    1. esnrun 重命名为 enrun
    2. esmrun 重命名为 emrun

Readme

Keywords

none

Package Sidebar

Install

npm i @wuxh/run

Weekly Downloads

2

Version

2.0.1

License

MIT

Unpacked Size

4.08 kB

Total Files

5

Last publish

Collaborators

  • wxh16144