have-changed
a cli tool to detect if a JSON file have changed since last time it was seen
TODO: Add tests
install
npm i -g have-changed
Usage
Usage: have-changed [options] jsonfile.json Options: -x, --changed-cmd String Command to execute
Example
# install deps only if the package.json `devDependencies` or `dependencies` have changed # this will only execute `npm i` on the current directory if the dependencies changed have-changed package.json -p 'devDependencies,dependencies' -x 'npm i' # just print to the stdout if the file or section of the json file has changed # this will print `true` to the stdout if the files changed or `false` if the # file or section of the file hasn't changed. `-q,--quiet` # will suppress all other output but the result of the check have-changed package.json -p 'devDependencies,dependencies' -q
Changelog
License
MIT