This application (npmtree
) outputs the tree of dependencies of a given npm package. That tree is presented in Markdown form.
This application is written in JavaScript and requires Node.js to run.
- Starting from v2.0.0, this module requires Node.js version 4.0.0 or newer because the module is rewritten in ECMAScript 2015 (ES6).
- You may run older versions of this module in Node.js version 0.10.x or 0.12.x. These older versions of this module, however, had to contain an additional dependency (
underscore.string
) as a polyfill for a missing ECMAScript 2015 (ES6) feature which is now a part of Node.js. Those older versions of Node.js are themselves not maintained by their developers after 2016-12-31.
-
Latest packaged version:
npm install -g npmtree
-
Latest githubbed version:
npm install -g https://github.com/Mithgol/npmtree/tarball/master
The application becomes installed globally and appears in the PATH
. Then use npmtree
command to run the application.
Instead of the above, download the ZIP-packed source code of the application and unpack it to some directory. Then run npm install --production
in that directory.
You may now move that directory (for example, on a flash drive) across systems as long as they have the required version of Node.js installed.
Unlike the above (npm -g
), the application does not appear in the PATH
, and thus you'll have to run it directly from the application's directory. You'll also have to run node npmtree
instead of npmtree
.
Use your command line to type npmtree packageName
when you need the tree of dependencies for the given package.
Here's an example of running a portable installation of npmtree (the tree of JSHint's dependencies is displayed):
You can use npx
to run npx npmtree packageName
without having to install npmtree permanently.
It is necessary to install JSHint for testing.
- You may install JSHint globally (
npm install jshint -g
) or locally (npm install jshint
in the directory of npmtree).
After that you may run npm test
(in the directory of npmtree). Only the JS code errors are caught; the code's behaviour is not tested.
MIT license (see the LICENSE
file).