Nodemon run specific command when specific file changes
Asked Answered
E

1

6

nodemon -w abc -x echo 'just watch abc folder' && nodemon -i abc -x echo 'watch all folder except abc folder'

If you looks script above, I'm trying to watch my abc folder, and when something changes inside them it will run echo 'just watch abc folder' without run echo 'watch all folder except abc folder'. What I know today is nodemon just restart the hole thing when something has changes.

What I need is it will run specific command when specific folder has changes. How can I do that?

Ewe answered 4/5, 2017 at 22:59 Comment(0)
T
0

Sorry for short reply and too late, but if still relevant then consider using --exec option, example from docs:

nodemon --exec "python -v" ./app.py
Thorncombe answered 20/12, 2022 at 16:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.