Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore node_modules and .git by default #230

Closed
remy opened this issue Dec 4, 2013 · 14 comments
Closed

Ignore node_modules and .git by default #230

remy opened this issue Dec 4, 2013 · 14 comments

Comments

@remy
Copy link
Owner

remy commented Dec 4, 2013

I'm proposing this for the #200 branch which will make nodemon 1.0.0 - hopefully very soon.

I'd love a +1 or -1 (and why) from people.

Currently going to proceed with this.

If you want to include node_modules, you'd include it explicitly in the watch params, probably something like this:

nodemon -w . -w node_modules
@remy
Copy link
Owner Author

remy commented Dec 4, 2013

This will also fix #214.

@machadogj
Copy link

+1

1 similar comment
@dominykas
Copy link
Contributor

+1

@jackfranklin
Copy link

+1 from me - can't see any real reason why I'd ever explicitly want those file changes to trigger a restart. Plus, if it's able to be done explicitly, the minority of people who want to do that can do.

@michaelBenin
Copy link

+1

@mdeltito
Copy link

mdeltito commented Dec 4, 2013

+1 for sure, seems much better as an opt-in

@keithamus
Copy link

I'd say -1 for node_modules. It doesn't change that frequently, and the times it does (npm install or npm update) you would probably want nodemon to restart (at least in the case of node_modules).

Lets say I am in a project, with nodemon running, wanting to update some modules. I do npm update <dependency>. Nodemon doesn't restart because it's ignoring node_modules.

The only downside I can see from nodemon watching node_modules folders is if you npm install and it restarts.

@remy
Copy link
Owner Author

remy commented Dec 4, 2013

@keithamus the justification for ignoring node_modules is that on linux, when there's a large number of files (over a few thousand) is that nodemon throws an exception. The fix is to up the file watch limit, but it's a hack fix.

Equally, I'm in the same boat, I want my app to restart when I change the node_modules, but the way I usually do it (i.e. my workflow) is (in the same terminal), nodemon is stopped, I npm install, then I run nodemon again (kinda counter intuitive, but wanted to share).

@keithamus
Copy link

Not sure how complicated it would be - but perhaps the perfect compromise would be to ignore all files inside node_modules that ARENT package.json? What way it keeps the ulimit down while keeping the functionality there.

@remy
Copy link
Owner Author

remy commented Dec 4, 2013

@keithamus maybe all the node_module directories in the node_modules directories is what needs to be ignored.

@keithamus
Copy link

@remy true that, double true.

@remy
Copy link
Owner Author

remy commented Dec 4, 2013

Okay, that seems to make a good compromise, by default I'm ignoring: .git and node_modules/**/node_modules.

Got it working on the #200 offline branch right now.

@mdeltito
Copy link

mdeltito commented Dec 4, 2013

excellent compromise @remy and @keithamus

@remy remy mentioned this issue Dec 5, 2013
18 tasks
@max-degterev
Copy link

👍 never watched the node_modules anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants