get-ideal-package-tree

2.0.0 • Public • Published

get-ideal-package-tree

Given a list of packages, returns a JSON representation of the ideal package tree - like how npm@3 would install it.

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install get-ideal-package-tree --save

Usage

/* eslint-disable import/no-extraneous-dependencies */
 
import getIdealPackageTree from 'get-ideal-package-tree';
 
getIdealPackageTree(['browserify', 'watchify'])
  .then(tree => {
    console.log('ideal dependency tree', tree);
  })
  .catch(err => {
    console.error(err);
  });
 
/*
There's also a CLI available:
 
$ get-ideal-package-tree browserify watchify
 
*/
 

Tests

npm install
npm test

Dependencies

  • get-pkg-json: Get a package.json, from either a npm registry or github
  • immutable-object-methods: Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.
  • object.entries: ES7 spec-compliant Object.entries shim.

Dev Dependencies

License

MIT

Generated by package-json-to-readme

Readme

Keywords

Package Sidebar

Install

npm i get-ideal-package-tree

Weekly Downloads

4

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kesla