dominictarr / npmd

MIT License
450 stars 37 forks source link

npmd install (without -g) does not create symlinks to executables (from .bin) #72

Open joeytwiddle opened 10 years ago

joeytwiddle commented 10 years ago

If you do npm install browserify it will add a symlink to the .bin folder:

./node_modules/browserify/...
./node_modules/.bin/browserify -> ../browserify/bin/cmd.js

But if you do the same with npmd then you don't get a symlink in the .bin folder.

(This might not be a common use-case since most people will use -g to install executables.)

This may be related to #31 which mentions compiling.

Would it be possible for npmd to download the package to its cache (if not already there), and then ask npm to perform the actual install from that downloaded package? (I guess npmd cannot work this way because npm would try to handle dependencies itself, and we want npmd to handle dependencies.)

dominictarr commented 10 years ago

It does this when it's a dev dependency, but really it would be good to always have this maybe?

kenany commented 10 years ago

It does this when it's a dev dependency

Hmm, not as far as I can tell...

{
  "devDependencies": {
    "tape": "^2.1.0"
  }
}
$ npm install
$ ls -A node_modules/
.bin tape

$ rm -rf node_modules/

$ npmd install
$ ls -A node_modules/
tape
kenany commented 10 years ago

Oh but it does if I explicitly do

$ npmd install tape

But surely npmd install (no args) should do it too for dev dependencies? Separate issue, perhaps?

dominictarr commented 10 years ago

so maybe the simplest/best solution is just to allways do it.

dominictarr commented 10 years ago

but, yes npmd install should certainly do it for the dev deps.

tomek-he-him commented 9 years ago

npmd install should certainly do it for the dev deps

I can confirm that it doesn’t on my machine.

And I can confirm that npmd install tape does create the symlinks.

maybe the simplest/best solution is just to allways do it.

That would be great! :+1: Least astonishment.