🍃 Leaf

Node Package Manager

Creating Public Packages

System Setup

# Create global configuration file
npmrc <user-name>

Initializing a Package

npm init --scope=@<user-name>

Publishing & Updating a Package

npm publish --access public # Use `access` only once.
npm version <major|minor|patch>
npm unpublish <package-name> -f
// package.json e.g.:
{
  "name": "@<user-name>/<package-name>",
  "publishConfig": {
    "registry": "https://registry.npmjs.org",
    "access": "public"
  }
}

More at: