littlefinger ☝️
Extend and compose package.json by pointing at multiple remotes
npm i littlefinger
on NPM
tldr;
Create this
From these
With this setup
const littlefinger = ; const dependencies = eslint: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-eslint.json' functional: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-functional.json' http: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-http.json'; const output = './simple.package.json'; // The types of dependencies you wish to gatherconst types = dependencies: true devDependencies: true peerDependencies: false ; littlefinger;
Usage
const littlefinger = ; // Lets create a package.json that combines dependencies from these 3 remote urls// NOTE: you can view them here https://github.com/cmswalker/littlefinger/tree/master/fixtures const dependencies = eslint: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-eslint.json' functional: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-functional.json' http: 'https://raw.githubusercontent.com/cmswalker/littlefinger/master/fixtures/remotes-http.json'; const output = './simple.package.json'; // Choose to ignore packages found in dependenciesconst blacklist = 'eslint-plugin-import'; // Enables logging to console instead of writing to filesystemconst dryrun = false; // The types of dependencies you wish to gatherconst types = dependencies: true devDependencies: true peerDependencies: false ; // NOTE: littlefinger takes the latest package version by default if duplicates are found littlefinger; // The result can be found @ https://github.com/cmswalker/littlefinger/blob/master/examples/simple.package.json