Compare commits

...

1 Commits

Author SHA1 Message Date
8d90fa1d53 docs: update readme 2019-04-05 15:54:48 -07:00

View File

@@ -6,6 +6,17 @@ Node package compare and change runner.
[![npm](https://img.shields.io/npm/v/pkgcomp.svg)](https://www.npmjs.com/package/pkgcomp)
[![Project Status](https://img.shields.io/badge/status-experimental-orange.svg)](https://nodejs.org/api/documentation.html#documentation_stability_index)
This tool will execute a command of the dependencies or lock files of your module have changed since the last time it was run. Any of the following
- If the `dependencies` or `devDependencies` in `package.json` change
- If the `dependencies` or `devDependencies` in any of your workspaces change
- Uses `workspaces` property in root `package.json`, works with Yarn workspaces
- If one of the files in your `checkFiles` config's md5 hash changes
If the command exits with a non-zero exit code, `pkgcomp` will exit with the same exit code.
**NOTE:** Out of the box the script will do nothing, you have to provide a command to run, via the `cmd` config. See [Configuration](#configuration) below.
## Usage
Simply install the package and run it from the command line in your project. You can install it globally and run it that way, but installing locally is generally better.
@@ -15,9 +26,7 @@ yarn add -D pkgcomp
npx pkgcomp
```
If the `dependencies` or `devDependencies` in `package.json` change, or if one of the files in your `checkFiles` config's md5 hash changes, your command will run. If the command exits with a non-zero exit code, `pkgcomp` will exit with the same exit code.
Out of the box the script will do nothing, you have to provide a command to run, via the `cmd` config. See [Configuration](#configuration) below.
**NOTE:** Out of the box the script will do nothing, you have to provide a command to run, via the `cmd` config. See [Configuration](#configuration) below.
You can also set the command, and control how the script works, via the available [command line arguments](#cli-arguments)