Shorthand For NPM Commands : As a web developer, you’re likely familiar with NPM (Node Package Manager) and its powerful capabilities for managing dependencies and running scripts. NPM provides a vast array of commands that can be used to streamline your development workflow. While these commands are highly useful, typing them out in their entirety can be time-consuming. Thankfully, NPM offers a set of convenient shorthands that allow you to execute commonly used commands with fewer keystrokes. In this article, we’ll explore some of the most commonly used shorthands for NPM commands, helping you save time and boost your productivity.
These are just a few examples, and there are many more npm commands available. You can find a comprehensive list of npm commands and their options in the official npm documentation.
// longhand
npm install package-name
// Sorthand
npm i package-name
// longhand
npm install --global package-name
// Sorthand
npm i -g package-name
// longhand
npm install --save dev package-name
// Sorthand
npm i -D package-name
// longhand
npm update package-name
// Sorthand
npm up package-name
// longhand
npm Uninstall package-name
// Sorthand
npm un package-name
// longhand
npm --version
// Sorthand
npm -v
// longhand
npm init --yes
// Sorthand
npm init -y
// longhand
npm help
// Sorthand
npm