An Interest In:
Web News this Week
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
August 29, 2021 09:21 pm GMT
Original Link: https://dev.to/geetcloud/npm-command-cheat-sheet-3j27
"npm" Command Cheat Sheet
Welcome back to a new blog post. Throughout my uses of npm and creating applications in angular, I have found a set of commands that I keep coming back to to use again and again. While they're all used very commonly, it might be heard to remember them all of the time. So without any further ado, here they are for your convenient use! Hope it helps.
To install node.js
# To install node.js # Install from the below official download link. # https://nodejs.org/en/#download
To install typescript
# To install typescriptnpm install typescript -g
To install angular CLI
# To install angular CLInpm install @angular/cli -g
To check angular version
# To check angular versionng version
To check the existing installed paths of node.js
# To check the existing installed paths of node.jswhere node
To create new angular app
# To create new angular appng new <app_name>
To create module
# To create moduleng g module <module_name>
To install dependencies
# To install dependenciesnpm install
To run or serve app
# To run/serve app#To serve app => cd to the app folder and run#Note:- npm start also will call ng serve and start the application.ng serve
To create service
# To create serviceng gnerate service service_name
To generate interface
# To generate interfaceng generate interface git-search
To install latest AngularFire and Firebase for latest Angular CLI 7.x
# To install latest AngularFire and Firebase for latest Angular CLI 7.xnpm install firebase @angular/fire --save
To skip/avoid long path in terminal (shortcut)
# To skip/avoid long path in terminal (shortcut)prompt $$
Thanks for reading this post!
I hope this article is informative and helpful in some way. If it is, please like and share this article. Follow me on Twitter | LinkedIn for more related tips and posts.
Happy learning!
Original Link: https://dev.to/geetcloud/npm-command-cheat-sheet-3j27
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To