feross / zelda

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

Check for global npm link packages #15

Closed Kikobeats closed 8 years ago

Kikobeats commented 8 years ago

Sometimes I'm developing a project that use a dependency created by mine.

In this case, because I have a local copy of the dependency and I want to be used in the project, I link the dependency as global and later in the project I do a npm link to import the dependency

Could be possible do the same but providing a zelda flag for that? something like if the flag is provided check first if the dependency exist as global in the system instead of fetch from npm registry

The thing that I'm trying to avoid is this:

[zelda] Found 0 local packages for your-project

❯ npm link my-global-dep
your-project/node_modules/my-global-dep -> /usr/local/lib/node_modules/my-global-dep -> /Users/me/Projects/my-global-dep
feross commented 8 years ago

Why not just have zelda create the symlink? zelda is supposed to be a replacement for npm link.

If the project you are developing is in your Projects folder, then it should be found and symlinked into your-project/node_modules/ when you invoke zelda.

Kikobeats commented 8 years ago

Good tip 👍