Skip to content

Commit

Permalink
BREAKING: Add --poll option
Browse files Browse the repository at this point in the history
Adds --poll option as a v2 compatibility measure. However, this new
implementation removes the ability to set the interval (supported in
v2).

Closes #107
  • Loading branch information
RyanZim committed Mar 14, 2017
1 parent 3df9572 commit 46dbce9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Expand Up @@ -88,6 +88,10 @@ Usage:
desc: 'Watch files for changes and recompile as needed',
type: 'boolean'
})
.option('poll', {
desc: 'Use polling for file watching',
type: 'boolean'
})
.option('x', {
alias: 'ext',
desc: 'Override the output file extension',
Expand Down Expand Up @@ -180,7 +184,10 @@ Promise.resolve()
})
.then((results) => {
if (argv.watch) {
const watcher = chokidar.watch(input.concat(dependencies(results)))
const watcher = chokidar.watch(
input.concat(dependencies(results)),
{ usePolling: argv.poll }
)

if (config.file) watcher.add(config.file)

Expand Down

0 comments on commit 46dbce9

Please sign in to comment.