Javascript Package


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)



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


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"



Javascript Package - Version



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


Install all project dependency

See dependency installation


See Javascript - Repository

Discover More
Javascript - Library

library in Javascript. A library is a distribution format as a package that is created from a module bundle from a prototype The difference between a package and a library is that the modules are...
Javascript - Module

functionality in Javascript. A module is different from a script file because: it defines a well-scoped object that does not pollute the global namespace. It list explicitly its dependencies Javascript...
Javascript Package - Global Package (Cli)

There are two type of packages. This article goes over the global package (for the whole OS). They are managed with the npm cli. Yarn (in Windows home\AppData\Local\Yarn\bin\) from the registry...
Javascript Package - Local Package

A local package is a package installed locally into your project. global npm install will create the node_modules directory in the current directory (if one doesn't exist yet), and will download...
Javascript Package - Package Manager

This article talks package manager in Javascript. They are the first component of the web toolchain as they permit to: declare package as dependency download and update package create a package...
Javascript Package - Package.json

Package.json is used by npm to store metadata for projects published as package. The package.json files: * serves as documentation for what packages your project depends on. * allows you to specify...
MonoRepo Manager - Lerna

Lerna is a wrapper around package manager that optimizes the workflow around publishing multi-package repositories with git and yarn It's not a full mono repository...
Node - Module (ie NPM Module)

The module notion in Node. A module in Node is the source script (not the bundled library/package). The module loader of Node use the commonJs format. Therefore a commonJS Module will run in Node. A...

Share this page:
Follow us:
Task Runner