在所需的模块更改后重新启动Node.js进程。-Node.js开发

  • s0_623552
    了解作者
  • 22.1KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-23 02:04
    上传日期
轻巧的替代nodemon和node-dev之类的工具的工具,它在启动后监视ESMLoader中找到的模块文件,并且不对运行时对象进行任何修改。 man在需要的模块更改后,重新启动Node.js进程。 轻巧的替代nodemon和node-dev之类的工具的工具,它在启动后监视ESMLoader中找到的模块文件,并且不对运行时对象进行任何修改。 它同时支持ES模块和CommonJS。 安装yarn全局添加nodemand#或npm install --global nodemand用法nodemand [选项] [... args]#示例nodemand server.js选项--debounce 更改检测后重新启动反跳
nodemand-master.zip
  • nodemand-master
  • .vscode
  • settings.json
    452B
  • main.js
    4.3KB
  • yarn.lock
    34.5KB
  • .eslintrc.js
    198B
  • injection.js
    1.4KB
  • @cli.js
    2.2KB
  • LICENSE
    1.1KB
  • README.md
    1.1KB
  • prettier.config.js
    58B
  • .gitignore
    189B
  • package.json
    490B
内容介绍
[![NPM Package](https://badge.fury.io/js/nodemand.svg)](https://www.npmjs.com/package/nodemand) # 🙅‍ Nodemand Restart Node.js process on required modules change. A light-weight alternative to tools like `nodemon` and `node-dev`, watches module files found in `ESMLoader` after start and no modification is made to the runtime objects. It supports both ES module and CommonJS. ## Installation ```bash yarn global add nodemand # or npm install --global nodemand ``` ## Usage ```bash nodemand [options] <module-path> [...args] # example nodemand server.js ``` ### Options - `--debounce <delay>` Debounce restart after change detection, defaults to 1000. - `--node-modules` Watch also files under node_modules (symbolic links will be resolved before filtering). - `--color`, `--no-color` Force color or no color in console output. - Other Node.js command line options. ## Caveats - It won't be able to know a CommonJS module if it failed to load at the beginning. This means if you have a CommonJS module with something like a syntax error at the first run, it will not be watched. ## License MIT License.
评论
    相关推荐