Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kagawagao committed Oct 19, 2021
1 parent 6441198 commit 10ef8f5
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,45 @@ npx diff-run
support all configurations which support by [`cosmiconfig`](https://github.com/davidtheclark/cosmiconfig)

- `diffrun` in `package.json`

```json
{
"diffrun": {
"package-lock.json": "npm ci"
}
}
```

- a JSON or YAML, extensionless "rc file", such as `.diffrunrc`

```json
{
"package-lock.json": "npm ci"
}
```

- an "rc file" with the extensions .json, .yaml, .yml, .js, or .cjs, such as `diffrunrc.json`

```json
{
"package-lock.json": "npm ci"
}
```

- a `diffrun.config.js` or `diffrun.config.cjs` CommonJS module

```javascript
module.exports = {
'package-lock.json': ['npm ci'],
}
```

config in `Array` will be executed in order. Otherwise, it will be executed concurrently

- In Order

```javascript
// this will be executed in order
module.exports = [
{
'package.json': ['npm ci'],
Expand All @@ -49,7 +81,10 @@ module.exports = [
]
```

- Concurrently

```javascript
// this will be executed concurrently
module.exports = {
'package.json': ['npm ci'],
'.eslintrc.js': 'npx eslint .',
Expand Down

0 comments on commit 10ef8f5

Please sign in to comment.