Is deleting a file not supposed to trigger a restart event? How can I capture a file being deleted? I've tried the following:
$ node
> require('nodemon')({
ext: '*.*',
exec: 'true',
ignore: false,
watch: process.cwd()
}).
on('restart', console.log);
Now, when I touch abc
(in another terminal) I see a console.log
message:
> [ '/abc' ]
However nothing happens when I rm abc
.
I've also opened an issue here.
Closing the loop on this, for now this is not possible. See linked issue in the question for more details.