Skip to content

Commit

Permalink
exit watch process on EOF / Ctrl-D
Browse files Browse the repository at this point in the history
  • Loading branch information
tverlaan committed Nov 9, 2020
1 parent e279de8 commit d79bb8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Expand Up @@ -92,6 +92,9 @@ Promise.resolve()
})
.then((results) => {
if (argv.watch) {
process.stdin.on('end', () => process.exit(0))
process.stdin.resume()

const printMessage = () =>
printVerbose(chalk.dim('\nWaiting for file changes...'))
const watcher = chokidar.watch(input.concat(dependencies(results)), {
Expand Down

0 comments on commit d79bb8d

Please sign in to comment.