How to use the watchr.open function in watchr

To help you get started, we’ve selected a few watchr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cds-snc / security-goals / api / src / db / watcher / index.js View on Github external
const watchChecks = () => {
  // Watch the path with the change listener and completion callback
  return watchr.open(watchPath, listener, next)
}
github angular / angular / aio / tools / transforms / authors-package / watchr.js View on Github external
p.then(() => {
  console.log('===================================================================');
  console.log('Started watching files in:');
  console.log(' - ', CONTENTS_PATH);
  console.log(' - ', API_SOURCE_PATH);
  console.log('Doc gen will run when you change a file in either of these folders.');
  console.log('===================================================================');

  watchr.open(CONTENTS_PATH, listener, next);
  watchr.open(API_SOURCE_PATH, listener, next);

});
github angular / angular / aio / tools / transforms / authors-package / watchr.js View on Github external
p.then(() => {
  console.log('===================================================================');
  console.log('Started watching files in:');
  console.log(' - ', CONTENTS_PATH);
  console.log(' - ', API_SOURCE_PATH);
  console.log('Doc gen will run when you change a file in either of these folders.');
  console.log('===================================================================');

  watchr.open(CONTENTS_PATH, listener, next);
  watchr.open(API_SOURCE_PATH, listener, next);

});
github AvenCloud / aven-legacy / legacy-src / CLI-start.js View on Github external
return new Promise((resolve, reject) => {
    const stalker = watchr.open(path, listener, function(err) {
      console.log("lolwat", err);
      if (err) return reject(err);
      console.log("watch successful on", path);
      resolve();
    });
  });
github F-loat / mpvue-entry / lib / utils / file.js View on Github external
[].concat(files).forEach((file) => {
    watchr.open(file, (changeType) => {
      if (changeType === 'update') {
        callback(file);
      }
    }, (err) => {
      if (err && err.code !== 'ENOENT') {
        throw err;
      }
    });
  });
}

watchr

Better file system watching for Node.js

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis