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 4, 2020
1 parent e279de8 commit 3d28270
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
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 3d28270

Please sign in to comment.