MENU
NPM
Alexa's Ranking: 7,165
NPM is a package manager for JavaScript.
To publish a package to npm:1) login to an npm account:
npm login |
2) prepare the package:
npm init |
3) publish the package:
npm publish |
In case the package already exists on npm, you will need to change the name field in the file package.json. You can check for naming collisions with the 'npm search' command. To publish to a scope, change the name to:
@username/package-name @username/package-name @username/package-name
in package.json.
You can use npm to install a repository from GitHub too, eg.:
npm i https://github.com/expressjs/express |