How to use the @atom/watcher.watchPath function in @atom/watcher

To help you get started, we’ve selected a few @atom/watcher 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 mathieudutour / graphql-x-sketch / lib / watch.js View on Github external
folders.map(p =>
      watcher.watchPath(p, {}, events => {
        events.forEach(event => {
          if (
            isSketchFile(event.path) ||
            (event.oldPath && isSketchFile(event.oldPath))
          ) {
            console.log(`Found an update in ${event.path}.`)
            onEvent(event)
          }
        })
      })
    )

@atom/watcher

Atom filesystem watcher

MIT
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Popular @atom/watcher functions