feross / zelda

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

Allow for linking one specific module #8

Closed gkatsev closed 9 years ago

gkatsev commented 9 years ago

I've found another usecase that might be useful. Giving zelda a specific module to link (or unlink) so it doesn't need to go and loop through everything.

feross commented 9 years ago

cool, this makes sense. i don't have time to implement it, but a PR is welcome!

gkatsev commented 9 years ago

I'll do that as soon as I find the time as well :)

serapath commented 9 years ago

would that include to temporarily replace a "globally installed module X" with a locally checked out repository of X? ... so that i can use X as a terminal command and its behavior changes live while i develop in the local repository of X :-)

currently i'm doing this:

  1. checkout global module repository X and run "npm link" in it
  2. go to path where i want to use the global cli tool and type "npm link X"
  3. define bash alias "alias X='./node_modules/X/bin/cli.js'", where 'cli.js' contains '#! /usr/bin/env node'

someone suggested me another possible way:

$PATH="$PATH:.../node_modules/.bin/..."

or something like that

how would zelda do it?

gkatsev commented 9 years ago

@serapath npm link already links bins to global, so, once you clone a repo and run npm link inside of it, that cloned version should already be available globally under the bin name, so, I don't think steps 2 and 3 should be necessary.

serapath commented 9 years ago

wow, true, :+1: thats awesome :-) thx.

feross commented 9 years ago

Closing out old issues. If you still want this feature, feel free to open a new issue or send a PR.

gkatsev commented 9 years ago

Makes sense. I'll get around to it eventually :)