Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Can we make npm link more ergonomic #113

Closed Answered by isaacs
jasonwilliams asked this question in CLI
Discussion options

You must be logged in to vote

So, npm link can take a folder name (or any other package spec) as an argument. How about this?

npm link ../super-long-package-name

or even:

cd /long/path/to/namespace/super/long/package/name/
cd ~/projects/my-app
npm link $(cd -; pwd)  #note: your cd settings may require piping that command to &>/dev/null

Or, if your shell supports it (most bash versions do):

cd /long/path/to/namespace/super/long/package/name/
cd ~/projects/my-app
npm link $OLDPWD

Supporting npm link - to mean "the last thing globally installed" would require tracking new information about the global install space, which we don't currently do, as @MylesBorins said. I'm not opposed to adding that, but it's gonna be mor…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jasonwilliams
Comment options

Answer selected by isaacs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
CLI
Labels
None yet
3 participants