A simple command line script that allows to prune parts of a yaml file
The command basically takes a YAML string from the standard input, a path
option (as supported by object-path), removes the yaml branch identified by the path and prints in the standard output the resulting yaml content.
Globally:
npm install --global yaml-prune
Or as a dev dependency (e.g. you need it as part of your build process)
npm install --save-dev yaml-prune
Using "pipes":
cat some.yml | yaml-prune
Using input redirection:
yaml-prune some.yml < file.yml
If you want to save the output to a file just use output redirection:
yaml-prune some.yml < file.yml > strippedFile.yml
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.
Licensed under MIT License. © Luciano Mammino.