diff --git a/README.md b/README.md index b23d5cd..570945a 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ Options - dark - neutral +This option does not accept environment variables or other dynamic values. If you want to change the theme dynamically, you can use the `theme` option in the `mermaidConfig` option. See [Mermaid Configuration](#mermaid-configuration) for more information. + ### mmdcPath In order for this generator to succeed you must have `mmdc` installed. This is the mermaid cli tool that is used to generate the ERD. By default the generator searches for an existing binary file at `/node_modules/.bin`. If it fails to find that binary it will run `find ../.. -name mmdc` to search through your folder for a `mmdc` binary. If you are using a different package manager or have a different location for your binary files, you can specify the path to the binary file. @@ -202,6 +204,17 @@ generator erd { } ``` +### Mermaid configuration + +Overriding the default mermaid configuration may be necessary to represent your schema in the best way possible. There is an example mermaid config [here](./example-mermaid-config.js) that you can use as a starting point. In the example JavaScript file, types are referenced to view all available options. You can also view them [here](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/defaultConfig.ts). The most common use cases for needing to overwrite mermaid configuration is for theming and default sizing of the ERD. + +```prisma +generator erd { + provider = "prisma-erd-generator" + mermaidConfig = "mermaidConfig.json" +} +``` + ### Puppeteer configuration If you want to change the configuration of Puppeteer, create a [Puppeteer config file (JSON)](https://pptr.dev/guides/configuration#configuration-files) and pass the file path to the generator.