Shorthand for installing multiple packages from a @scope

(Onur Yıldırım) #1

Normally you’d do this to install multiple package from the same org:

npm i --save @scope/lib1 @scope/lib2 @scope/lib3 @scope/lib4

It would be nice to have a shorthand version:

npm i --save @scope/lib1,lib2,lib3,lib4

What do you think?

Please support --production or --only=production in npm audit
(Kat Marchán) #2

Can’t you already do this in modern shells with something like: npm i @scope/{lib1,lib2,lib3}? :thinking:

p.s. just a reminder that you don’t need --save as of npm5

(Joshua) #3

Just tested the brace expansion, and it works really well. For example: npm i --no-save @babel/{core,preset-env,plugin-proposal-nullish-coalescing-operator} to install babel, the env preset, and a plugin.

(Onur Yıldırım) #4

@zkat didn’t know that. tried with iTerm on Mac and it works.