Learn JavaScript
4.3K subscribers
459 photos
10 videos
132 files
3.02K links
All info, tutorial, JS tips and more ....!
bio.link/javascript_js_
For HTML: @html_web_learn
For CSS: @CSS_web_learn
For JS: @JavaScript_js_learn
For PHP: @learn_php_web
For Programming courses @Programmingworld_dev
For CEH,Cybersec: @technical_stark
Download Telegram
Difference between tilde and caret on version dependency in package.json file

https://blog.bitsrc.io/difference-between-tilde-and-caret-in-package-json-bc9e59b125df

#package #npm
NPM Commands Every Developer Should Know.

📌 npm init

Initializes the package.json file of a project.

Use the -y flag to skip the questions and to create a package.json using default values.

📌 npm install

Installs the dependencies listed in package.json.

Shorthand: npm i

📌 npm install <package>

Installs a package from the npm registry.

Shorthand: npm i <package>

📌 npm install -g <package>

Installs a package globally on your machine.

📌 npm uninstall <package>

Like the command itself suggests, it uninstalls packages that are already installed.

Shorthand: npm un <package>

📌 npm uninstall -g <package>

Uninstalls a global package from your machine.

📌 npm update <package>

Updates the specified package to the latest version available. If 'package' is not specified, it updates every package.

Shorthand: npm up <package>

📌 npm update -g <package>

Updates a global package to the latest version available.

📌 npm list

Lists all the installed packages and their versions, along with their dependencies in a tree structure.

📌 npm view <package> <version>

Shows available details about the specified package. If the version is not set, it defaults to the latest version.

📌 npm run <script>

Executes the specified 'script', if found as a property of the 'script' object in package.json.

📌 npm help <term>

Tries to show the appropriate documentation page for the term provided.


#NPM #Commands #Devloper