From dcef9c6c996d84df343cfec3030be63e5e82b7c6 Mon Sep 17 00:00:00 2001 From: sverweij Date: Tue, 25 Apr 2023 19:06:20 +0200 Subject: [PATCH] doc: makes readme backwards compatible --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index c69944458..862ea9acb 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,18 @@ a one liner: npx depcruise src --include-only "^src" --output-type dot | dot -T svg > dependency-graph.svg ``` +>
+> dependency-cruiser v12 and older: add --config option +> 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 +> ``` + +
+ - 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)_ @@ -110,6 +122,18 @@ Sample rule: npx depcruise src ``` +>
+> dependency-cruiser v12 and older: add --config option +> 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 +> ``` + +
+ 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)