HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
npm is the world's largest Software Library (Registry)
The registry contains over 800,000 code packages.
Many organizations also use npm to manage private development.
You can download all npm public software packages without any registration or logon.
C:\>npm install <package>
>npm install <package>
This means that you have to install Node.js to get npm installed on your computer.
Download Node.js from the official Node.js web site: https://nodejs.org
The name npm (Node Package Manager) stems from when npm first was created as a package manager for Node.js.
All npm packages are defined in files called package.json.
The content of package.json must be written in JSON.
At least two fields must be present in the definition file: name and version.
{
"name" : "foo",
"version" : "1.2.3",
"description" : "A package for fooing things",
"main" : "foo.js",
"keywords" : ["foo", "fool", "foolish"],
"author" : "John Doe",
"licence" : "ISC"
}
Dependencies are also defined in package.json.
If you want to share your own software in the npm registry, you can sign in at:
You can publish any directory from your computer as long as the directory has a package.json file.
Check if npm is installed:
C:\>npm
Check if you are logged in:
C:\>npm whoami
If not, log in:
C:\>npm login
Username: <your username>
Password: <your password>
Navigate to your project and publish your project:
C:\Users\myuser>cd myproject
C:\Users\myuser\myproject>npm publish