package-strip-deps v1.1.0
package-strip-deps
A little command line utility that allows to strip dependencies from a NPM package.json file.
The command basically takes the JSON content of a package.json file and prints in the standard output the same content but by stripping
the keys dependencies and devDependencies.
Install
Globally:
npm install --global package-strip-depsOr as a dev dependency (e.g. you need it as part of your build process)
npm install --save-dev package-strip-depsUsage
Using "pipes":
cat package.json | package-strip-depsUsing input redirection:
package-strip-deps < package.jsonIf you want to save the output to a file just use output redirection:
package-strip-deps < package.json > strippedPackage.jsonKeep specific packages
If you want to keep specific packages from either dependencies or devDependencies,
you can use the --keep flag as follows:
package-strip-deps --keep serverless --keep lodashIn this case serverless and lodash will remain in the final JSON and all the other
dependencies will be stripped
Contributing
Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.
License
Licensed under MIT License. © Luciano Mammino.