Closed max-degterev closed 10 years ago
running with
nodemon -w mp_homepage.coffee mp_homepage.coffee
Rules not being merged correctly?
Can you drop me the output of --dump
on this too?
--dump
should be used in addition to all the parameters you were using that caused the issue.
Here you go.
max@maxs-mbp:~/Repositories/express-boilerplate (master)$ nodemon -w app.coffee app.coffee --dump
10 Jan 00:18:49 - [nodemon] v1.0.8
10 Jan 00:18:49 - [nodemon] reading config /Users/max/Repositories/express-boilerplate/nodemon.json
10 Jan 00:18:49 - [nodemon] to restart at any time, enter `rs`
10 Jan 00:18:49 - [nodemon] ignoring: \.git node_modules/* public/* npm-debug.log *.coffee
10 Jan 00:18:49 - [nodemon] watching: app.coffee
10 Jan 00:18:49 - [nodemon] watching extensions: js,json,jade
--------------
{ run: false,
system:
{ cwd: '/Users/max/Repositories/express-boilerplate',
useFind: true,
useWatch: false,
useWatchFile: false },
required: false,
dirs: [ '/Users/max/Repositories/express-boilerplate' ],
timeout: 1000,
options:
{ watch: [ 'app.coffee', re: /app\.coffee/ ],
dump: true,
script: 'app.coffee',
args: [],
ignore:
[ '\\.git',
'node_modules/*',
'public/*',
'npm-debug.log',
'*.coffee',
re: /\\\.git|node_modules/.*|public/.*|npm\-debug\.log|.*\.coffee/ ],
ext: 'js,json,jade',
verbose: true,
restartable: 'rs',
execMap: { py: 'python', rb: 'ruby' },
stdin: true,
execOptions:
{ script: 'app.coffee',
exec: 'coffee',
nodeArgs: undefined,
ext: 'js,json,jade',
execArgs: [] },
monitor:
[ 'app.coffee',
'!\\.git',
'!node_modules/*',
'!public/*',
'!npm-debug.log',
'!*.coffee' ] },
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded: [ '/Users/max/Repositories/express-boilerplate/nodemon.json' ] }
--------------
OS: darwin x64
node: v0.10.24
nodemon: v1.0.8
cwd: /Users/max/Repositories/express-boilerplate
command: node /usr/local/bin/nodemon -w app.coffee app.coffee --dump
--------------
10 Jan 00:18:49 - [nodemon] exiting
max@maxs-mbp:~/Repositories/express-boilerplate (master)$
looks like if there are command-line arguments, json rules are just ignored instead of being merged, because:
max@maxs-mbp:~/Repositories/express-boilerplate (master)$ nodemon app.coffee --dump
10 Jan 00:21:10 - [nodemon] v1.0.8
10 Jan 00:21:10 - [nodemon] reading config /Users/max/Repositories/express-boilerplate/nodemon.json
10 Jan 00:21:10 - [nodemon] to restart at any time, enter `rs`
10 Jan 00:21:10 - [nodemon] ignoring: \.git node_modules/* public/* npm-debug.log *.coffee
10 Jan 00:21:10 - [nodemon] watching: app/server/* app/shared/* config/* views/server/* views/shared/*
10 Jan 00:21:10 - [nodemon] watching extensions: js,json,jade
--------------
{ run: false,
system:
{ cwd: '/Users/max/Repositories/express-boilerplate',
useFind: true,
useWatch: false,
useWatchFile: false },
required: false,
dirs: [ '/Users/max/Repositories/express-boilerplate' ],
timeout: 1000,
options:
{ dump: true,
script: 'app.coffee',
args: [],
ignore:
[ '\\.git',
'node_modules/*',
'public/*',
'npm-debug.log',
'*.coffee',
re: /\\\.git|node_modules/.*|public/.*|npm\-debug\.log|.*\.coffee/ ],
ext: 'js,json,jade',
verbose: true,
watch:
[ 'app/server/',
'app/shared/',
'config/',
'views/server/',
'views/shared/',
re: /app/server/|app/shared/|config/|views/server/|views/shared// ],
restartable: 'rs',
execMap: { py: 'python', rb: 'ruby' },
stdin: true,
execOptions:
{ script: 'app.coffee',
exec: 'coffee',
nodeArgs: undefined,
ext: 'js,json,jade',
execArgs: [] },
monitor:
[ 'app/server/*',
'app/shared/*',
'config/*',
'views/server/*',
'views/shared/*',
'!\\.git',
'!node_modules/*',
'!public/*',
'!npm-debug.log',
'!*.coffee' ] },
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded: [ '/Users/max/Repositories/express-boilerplate/nodemon.json' ] }
--------------
OS: darwin x64
node: v0.10.24
nodemon: v1.0.8
cwd: /Users/max/Repositories/express-boilerplate
command: node /usr/local/bin/nodemon app.coffee --dump
--------------
10 Jan 00:21:10 - [nodemon] exiting
max@maxs-mbp:~/Repositories/express-boilerplate (master)$
@remy if you have time perhaps we can debug it over IRC and figure it out. Had to roll back to 0.7.10 for now :(
Picking this up - sorry I've been slack!
Ahh. I think I've got it. You're overriding the watch
on the command line aren't you? I've just spotted you comment something to that effect too.
Yes, if you define watches or ignores on the CLI then they override any config found, rather than merge.
If you think this should be merged, it's a feature request - which I'm open to - but would like to get a few other opinions on the change of behaviour (and equally - do point out if 0.7.x used to also merge the ignores - it's highly likely I've forgotten!).
Sorry, I seem to have a lot of problems with 1.x release :(
I updated nodemon on my home machine today and here's the result:
Looks like local nodemon.json watch rule is not used at all, contents:
What am I doing wrong?