Table of Contents

About

Code Shipping - Packaging ( Archive | Container ) in Javascript.

A Package is a distribution format that wraps:

All packages follow the npm specification and adhere to the package.json semantic.

How to create a package (module): Node - Module (ie NPM Module)

Properties

Id

The unique identifier is its name and version together defined in the package.json

Name

A package is:

  • a folder containing a program described by a package.json file
  • a gzipped tarball containing the folder
  • a url pointing to a tarball
  • a <name>@<version> that is published on the registry
  • a <name>@<tag> (see npm-dist-tag)
  • a <name> that has a “latest” tag satisfying
  • a <git remote url> that resolves to a folder
npm install git+ssh://[email protected]:isaacs/sax-js.git#cae7b6fb8c
npm install sax@git+ssh://[email protected]:isaacs/sax-js.git#cae7b6fb8c
npm install git+https://[email protected]/isaacs/sax-js.git#cae7b6fb8c

Scope (Private Module)

To create a scoped package, you simply use a package name that starts with your scope.

{
  "name": "@username/project-name"
}

See:

Version

Javascript Package - Version

Management

Create

Turn the folder into a package by generating a package.json file

yarn init
// or 
npm init -y

Installation / Update / Delete

A package can be installed

See:

Install all project dependency

See dependency installation

Repository

See Javascript - Repository