Javascript Package

> (World Wide) Web - (W3|WWW) > Javascript (Js|ECMAScript) > Javascript Package

1 - 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)


3 - Properties

3.1 - Id

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

3.2 - 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://
npm install sax@git+ssh://
npm install git+

3.3 - Scope (Private Module)

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

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



3.4 - Version

4 - Management

4.1 - Create

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

yarn init
// or 
npm init -y

4.2 - Installation / Update / Delete

A package can be installed



4.3 - Install all project dependency

4.4 - Repository