目录

egg-watcher-chokidar

NPM version build status Test coverage David deps Known Vulnerabilities npm download

if you use some network file systems or other virtualization software, an use default watcher can’t detected file change. you can use this plugin;

Install

$ npm i egg-watcher-chokidar --save

Usage

// {app_root}/config/plugin.js
exports.watcherChokidar = {
  enable: true,
  package: 'egg-watcher-chokidar',
};

if you just want use it in local evniroment, you just add this config to ${app_root}/config/plugin.local.js file

Configuration

This plugin used chokidar and you can pass chokidar options as following.

// {app_root}/config/config.default.js
exports.watcherChokidar = {
  usePolling: true,
  alwaysStat: true,
};

see https://github.com/paulmillr/chokidar#api for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT

关于
60.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号