1.2.1 ā¢ Published 5 years ago
pkg-dep-tree v1.2.1
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.
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.