Skip to content

Commit

Permalink
Ignore more than one events for changing the main script file
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroki Takami committed Apr 1, 2018
1 parent 4b0153f commit bd1ee8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = (glob, options) => {
// A hard reset is only done when the main file has changed
let eXecutable = options.electron
if (eXecutable && fs.existsSync(eXecutable)) {
chokidar.watch(mainFile).on('change', () => {
chokidar.watch(mainFile).once('change', () => {
// Detaching child is useful when in Windows to let child
// live after the parent is killed
let child = spawn(eXecutable, [appPath], {
Expand Down

0 comments on commit bd1ee8d

Please sign in to comment.