Request: allow npm install to accept path to json file describing dependencies #6661
Comments
Sounds to me like you might as well just have a |
Dependencies in package.json are never installed in global mode. I'd like to programmatically configure global packages on a new box, which seems like a reasonable use-case. Also, there isn't really an associated package, so there wouldn't be a proper name or version. (That said, I do understand why such a request sounds a little odd, given package.json's existence as a core component of npm. I just want a batch version of |
Ah, true. However, there's still a way to do this with a |
Ah, thanks for the tip, @kenany ! That's a great solution for now. I'll close this. |
Hmm, actually I guess that wouldn't put them in |
I was just realizing this. I'll figure it out- this is still a good start. I wonder if I ought to reopen this issue, to see if anyone else would voice for such a feature. I admit it's slightly awkward, but perhaps it would be useful. Perhaps there's yet a better solution! Opening for two days of input, then I'll close it out. |
I see the feature here, but I do think it's a pretty marginal use case, and would be curious to hear if there's enough desire for the feature to warrant making it a supported feature. It seems like it would be pretty trivial to write a small wrapper module that reads either a standalone file or a special stanza in a |
Sure! Is there a good starting-point to translate |
|
The CLI team is triaging our feature requests, and have decided to close this issue. This sounds like something that would be useful as an external utility, but isn't something that makes sense for npm itself. Thanks for your time and the discussion! |
It would be very useful if
npm install
accepted a path to a file that included json formatted the same as package.json'sdependencies
value. My use-case is to programmatically configure a list of global packages on, say, a new box. I haven't found a good solution to arbitrarily translate{"package-name": "version/uri"}
(a la package.json) into something likenpm install package-name@version
.The text was updated successfully, but these errors were encountered: