1.2.1 ā€¢ Published 5 years ago

pkg-dep-tree v1.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

pkg-dep-tree

šŸŒ² A better npm list.

npm list is a really useful tool for visualising your dependency tree. It's quite hard to use within your application and focuses on the node_modules folder however. pkg-dep-tree aims to empwoer developers to print out peer dependency structures given a package.json file with support for mono repos.


I'm aspiring to make open-source my full-time work. If you like the work that I do, please consider supporting me.

Coffee PayPal

Install

npm i pkg-dep-tree

Usage

Module

const { GetMonoDepTree, PrintTreeTrim } = require( 'pkg-dep-tree' );

(async () => {
    let workspace = Path.join( __dirname, '/../components' );
    let org = '@gov.au';
    let treeObject = await GetMonoDepTree( workspace, 'side-nav', org );

    console.log( await PrintTreeTrim( treeObject ) );
})();

Output

ā”œā”€ core
ā”œā”€ animate
ā”œā”€ accordion
ā”‚  ā”œā”€ animate
ā”‚  ā””ā”€ core
ā””ā”€ link-list
   ā”œā”€ core
   ā””ā”€ body
      ā””ā”€ core

Test

npm test

Contribute

Don't be scared raise an issue or a pull request! Any contributions, no matter how big or small will land your picture here.