modify-package-dependencies
Modify dependencies to a package.json-file - simlar to what "npm install --save[-dev]" or "npm uninstall --save[-dev]" does (without the actual [un]installing)
Table of Contents
Install
npm install modify-package-dependencies [-g]
Usage
module
; const packageJson1 = dependencies: package1: '^2.1.3' devDependencies: package2: '^7.0.1' ; const updatedPackageJson = ;console;console;console;
cli
The cli updates the current package.json file, in the current directory.
modify-package-dependencies --add package1@1 --add package2 --add github/arg#branchmodify-package-dependencies -p package1@1 -p package2 -p github/arg#branch# the two above are equivalent modify-package-dependencies --add-dev devPackage1@1modify-package-dependencies -d devPackage1@1# the two above are equivalent modify-package-dependencies --remove package1 --remove package2modify-package-dependencies -r package1 -r package2# the two above are equivalent
Contribute
PRs accepted.
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © David Björklund