Merge multiple package.json files together preserving key order and sorting dependencies.
Install merge-pkg
using yarn
:
yarn add merge-pkg
import mergePkg from 'merge-pkg';
const merged = mergePkg(firstPackageJSON, secondPackageJSON, thirdPackageJSON);
If you have any ideas on how this module could be better, create an Issue or submit a PR.