Ability to specify NODE_DEV_IGNORE #49

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@alexgorbatchev

Can now pass list of paths to ignore separated by : using NODE_DEV_IGNORE env variable.

@alexgorbatchev alexgorbatchev You can now set `NODE_DEV_IGNORE` environment variable to a list of p…
…aths separated by `:`. All files inside these paths will be ignored.
6b9ddb7
@fgnass
Owner

I'm curious, what's your use-case for this setting?

@alexgorbatchev

Big issue comes from the fact that vm* functions are hooked up to node-dev. We are using vm* to read and parse config options that are plain JavaScript files which are generated by the UI form... so when I click "save" and the file is changes, web server gets restarted and this interrupts further processing.

From looking at other similar tools it seems that most of them have this feature and so I thought it would be nice to implement this in my favorite one :)

@fgnass
Owner

Good point! I'm not sure if an environment var is the best solution in this case though. I chose that approach for the screen blanking thing because it's a global setting. An exclude pattern looks more like a per-project configuration to me. On the other hand the whole idea of node-dev was to be a zero-config solution ... Hm, I think I have to meditate about this some more ...

@alexgorbatchev

ENV variables could be used per project using command line, and that's what I do for my projects.

$> NODE_DEV_IGNORE=./tmp node-dev app/index.js
This was referenced Nov 7, 2012
@fgnass
Owner

Closing this as VM-hooks can now be switched off. If this particular feature is still needed, the way to go would be to add an option to the config file and pass it to chokidar here.

@fgnass fgnass closed this Mar 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment