I'm reposting my issue here because I dunno if the pm2-dev repo issues are taken care of or even visible to the Unitech team.. :-S
Original issue (let me know if I have to close it):
https://github.com/Unitech/pm2-dev/issues/1
I maybe confused but it seems that the --ignore-watch option is not supported by pm2-dev.
Tried to run:
$ pm2-dev run server.js --ignore-watch='^.*\.log$ es6 client public \.git'
Got:
error: unknown option `--ignore-watch'
Is there a way to ignore a set of files in development mode?
Thanks
Even ignore_watch config in package.json is not supported.
--ignore option available for pm2-dev (<=> pmd command) on pm2@next
$ npm install pm2@next -g
$ pmd app.js --ignore "something,somethingelse"
I am trying this , it's not work.
But you can using another way to ignore watching some files.
Config a json file: app.json
{
"apps" : [{
"name" : "app",
"script" : "./app.js",
"watch" : true,
"ignore_watch" : ["node_modules", "sqlLogRunTime.txt"]
}]
}
And start with this command : pm2-dev start app.json
pm2-dev documentation is horrible
Rather read the source:
https://github.com/Unitech/pm2/blob/master/lib/DevCli.js
Most helpful comment
I am trying this , it's not work.
But you can using another way to ignore watching some files.
Config a json file: app.json
{ "apps" : [{ "name" : "app", "script" : "./app.js", "watch" : true, "ignore_watch" : ["node_modules", "sqlLogRunTime.txt"] }] }And start with this command : pm2-dev start app.json