Skip to content

Commit

Permalink
doc: makes readme backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
sverweij committed Apr 25, 2023
1 parent 307c307 commit dcef9c6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ a one liner:
npx depcruise src --include-only "^src" --output-type dot | dot -T svg > dependency-graph.svg
```

> <details>
> <summary>dependency-cruiser v12 and older: add --config option</summary>
> While not necessary from dependency-cruiser v13, in v12 and older you'll have
> to pass the --config parameter to make it find the .dependency-cruiser.js
> configuration file:
>
> ```shell
> npx depcruise src --include-only "^src" --config --output-type dot | dot -T svg > dependency-graph.svg
> ```
</details>
- You can read more about what you can do with `--include-only` and other command line
options in the [command line interface](./doc/cli.md) documentation.
- _[Real world samples](./doc/real-world-samples.md)_
Expand Down Expand Up @@ -110,6 +122,18 @@ Sample rule:
npx depcruise src
```
> <details>
> <summary>dependency-cruiser v12 and older: add --config option</summary>
> While not necessary from dependency-cruiser v13, in v12 and older you'll have
> to pass the --config parameter to make it find the .dependency-cruiser.js
> configuration file:
>
> ```shell
> npx depcruise --config .dependency-cruiser.js src
> ```
</details>
This will validate against your rules and shows any violations in an eslint-like format:
![sample err output](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/sample-err-output.png)
Expand Down

0 comments on commit dcef9c6

Please sign in to comment.