clux / symlink

npm link helper for npm@^2
MIT License
33 stars 6 forks source link

Dev dependencies are added to dependencies #5

Closed raypatterson closed 8 years ago

raypatterson commented 8 years ago

HI,

Thanks for this tool, it is the best one I've found for my needs.

I am seeing one issue where devDependencies are being copied to the dependencies list.

Just wondering if I'm doing something wrong, or if I should clean up the copies so my package.json isn't changed.

clux commented 8 years ago

Hey, glad you like it :)

I am not sure I understand your issue though. Are you saying symlink modifies your package.json? It should only read it. The only way it could modify it if npm install is aliased to always --save or something. Do you have an example for reproducing this?

raypatterson commented 8 years ago

Oh duh, that's it! I'd added an .npmrc file with save=true ... Didn't expect this to cause devDependencies to be saved as dependencies on install but it looks like that's what's happening.

clux commented 8 years ago

Ah good. Yeah, the save flags look a little dumb in that aspect. npm install itself will read and obey dependency version ranges, but the --save flag seems to be just a post-install thing that has no checks. Oh well. Thanks for letting me now.

raypatterson commented 8 years ago

Thanks for helping me understand the problem.