feross / zelda

Automatically `npm link` all your packages together!
MIT License
283 stars 32 forks source link

Skin npm install #2

Closed alexgorbatchev closed 10 years ago

alexgorbatchev commented 10 years ago

What do you think about changing zelda to just do linking. I'm running into the case where one of my post install NPM scripts updates my private modules which were just symlinked by zelda.

You could always manually call npm install && zelda .. but currently you can't just create symlinks without having it call npm install.

Thoughts?

feross commented 10 years ago

Are you suggesting also not running npm install for the linked modules as well?

alexgorbatchev commented 10 years ago

That's right. In my branch I took out npm install all together:

https://github.com/alexgorbatchev/zelda/compare/patch-2

I found that I would call zelda .. from my module folders way more often than I need to re/install everything. My app is in active development so I add modules very often and they cross reference to a certain degree. I would npm install once to kick off the module then go back to the parent module, add newly created module to it and call zelda .. just to link this one guy in... which ends up running npm install everywhere.

I feel that the use case that you describing in README is good for initial set up of an existing project that doesn't add modules all that often.

:bulb: Perhaps npm install could be hidden away behind a flag?

feross commented 10 years ago

Hmm... Doesn't npm link automatically run npm install on the linked module? Seems like it's worth keeping parity with this existing behavior since conceptually zelda is just helping you run multiple npm link commands. Maybe the no-install behavior could be behind a flag?

gkatsev commented 10 years ago

npm link does run npm install when you link a module for usage.

feross commented 10 years ago

Added a --skip-install (aliased as -s) option to skip running npm install entirely.

feross commented 10 years ago

Published as 2.2.0.