Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shorhand for installing multiple npm modules from the same package

Any short hand for installing multiple npm modules from the same package ?

I mean, instead of doing:

npm i @angular/common @angular/compiler @angular/core @angu lar/forms @angular/http @angular/platform-browser @angular/platform-browser-dynamic @angular/router @angular/router -deprecated -S

Can I do something like:

npm i @angular/{common, compiler, core, forms, platform-browser, platform-browser-dynamic, router, router-deprecated} -S

like image 416
Lekhnath Avatar asked Aug 10 '16 14:08

Lekhnath


1 Answers

I was much close to the solution in my question. I can do this by removing the extra space character from within curly braces like below:

npm i @angular/{common,compiler,core,forms,platform-browser,platform-browser-dynamic,router,router-deprecated} -S

like image 193
Lekhnath Avatar answered Sep 24 '22 06:09

Lekhnath