browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Add debug() #188

Closed retrofox closed 9 years ago

retrofox commented 9 years ago

Start to use debug() module to follow the watching process. Just use DEBUG=watchify process environment var to activate it.

zertosh commented 9 years ago

@substack I think this is useful, but I've never seen you use debug - you should make the final call on this.

retrofox commented 9 years ago

I think It's very useful.

For instance right now this screenshot shows that files into node_modules are being watched. does it make sense ?

zertosh commented 9 years ago

@retrofox FYI: All files are watched by default. You can ignore them (including node_modules) with the --ignore-watch flag or the ignoreWatch option.

retrofox commented 9 years ago

@zertosh I don't think so

  --ignore-watch=GLOB, --iw GLOB    [default: false]

    Ignore monitoring files for changes that match the pattern. Omitting
    the pattern will default to "**/node_modules/**".

https://github.com/substack/watchify/blob/master/index.js#L23

retrofox commented 9 years ago

Actually the debug line is printing when a new files starts to be watched. It delegates ignored to chokidar.

retrofox commented 9 years ago

But when I just save any file into node_modules/ I get the watch event

zertosh commented 9 years ago

@retrofox What CLI flag or option did you use exactly?

retrofox commented 9 years ago

@zertosh We've tried a lot of paths. For instance ./lib/*.js just to test. Also I've teste with --ignore-watch=true, --ignore-watch=**/node_modules/**, etc.

zertosh commented 9 years ago

your shell might be expanding the glob... try quoting it and/or try --ignore-watch. what's the full command you're using?