watch-detector

[![Build Status](https://travis-ci.org/chrmod/watch-detector.svg?branch=master)](https://travis-ci.org/chrmod/watch-detector)

MIT 4 个版本
安装
npm install watch-detector
yarn add watch-detector
pnpm add watch-detector
bun add watch-detector
README

watch-detector

Build Status

Utility for selecting the best options for sane:

watcher options:

  • watchman: if a valid version of watchman is installed, we will prefer this.
  • node: use node's built in watcher, if watchman is not present.

future options:

usage

yarn add watch-detector
const WatchDetector = require('watch-detector');
const sane = require('sane');

let detector = new WatchDetector();
let saneOptions = {
  /* sane options */
};

let options = detector.findBestWatcherOption(saneOptions)
/* options's watcher selection will be based on various heuristics */
sane(root, options);

optional

new WatchDetector({
  ui: /* console-ui instance */,
  fs: /* fs instance */
});
版本列表
1.0.2 2022-07-28
1.0.1 2021-06-07
1.0.0 2019-09-07
0.1.0 2017-12-11