npm.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 25 Apr 2024 22:33:14 +0300
changeset 2593 f0ab046a080f
parent 2556 03ce3e35cd5b
permissions -rw-r--r--
Installing Android SDK from command line tools.


=====================
 npm package manager
=====================
.. contents::
   :local:

NPM package versions & tags
===========================

To list available tags use command ``npm view $PGK``::

  npm view npm
  npm v npm
  npm show npm

It is a common practice for modules to provide following two tags::

  latest
  next

To get all available versions::

  npm show lodash@* version
  npm show lodash versions
  npm view npm --json

To get the currently used version in the ``package.json``-kind of project::

  npm list lodash

Prune unused packages
=====================

Prune all::

  npm prune

Prune by name::

  npm prune $NAME1 #NAME2

https://docs.npmjs.com/cli/prune
  Remove extraneous packages.