Skip to content

Commit

Permalink
CLI: Update node-watch to 0.6.0
Browse files Browse the repository at this point in the history
* Added 'ready' event.
* Improved Linux support for recursive watching (changes from new
  directories during the debounce are now reported as well).
* Fixed various bugs.
  • Loading branch information
Krinkle authored and trentmwillis committed Jan 3, 2019
1 parent 08f1c69 commit 57cea14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"commander": "2.12.2",
"js-reporters": "1.2.1",
"resolve": "1.5.0",
"node-watch": "0.5.9",
"node-watch": "0.6.0",
"minimatch": "3.0.4"
},
"devDependencies": {
Expand Down
10 changes: 4 additions & 6 deletions src/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ run.watch = function watch() {
run.restart( args );
} );

watcher.on( "ready", () => {
run.apply( null, args );
} );

function stop() {
console.log( "Stopping QUnit..." );

Expand All @@ -170,12 +174,6 @@ run.watch = function watch() {

process.on( "SIGTERM", stop );
process.on( "SIGINT", stop );

// initial run must be delayed by at least 200ms
// https://github.com/yuanchuan/node-watch/issues/71
setTimeout( () => {
run.apply( null, args );
}, 210 );
};

module.exports = run;

0 comments on commit 57cea14

Please sign in to comment.