build
The build
command is for generating documentation.
Option: format
npx erdia build --format html -o dist/
You can use the format option to generate documents in any format you want. Currently, you need to create a document in HTML format to view multiple versions at single document.
format | description |
---|---|
html | generate html document |
md | generate markdown document |
generate pdf document | |
image | generate image, only ER diagram |
Options
option | alias | required | default | description |
---|---|---|---|---|
--version | display version | |||
--help | display help | |||
--data-source-path | -d | required | define the path to TypeORM data source file | |
--output | -o | define the directory to output file | ||
--config | -c | define the path to to configuration file | ||
--components | -t | 'table', 'er' | define the output component to builded documents select one in table , er or both | |
--project-name | 'app' | define whether project name will come from the package.json name field or database nameselect one in app , db | ||
--database-path | define the directory to store erdiadb.json | |||
--template-path | define the directory to ETA templates | |||
--skip-image-in-html | false | enabling the this option will skip attaching the ER diagram image file to the html document. Alpine linux need extra working for puppeteer. In this case you can skip image build stage using this option. | ||
--format | 'html' | define the output format to builded documents select one in html , md , pdf , image | ||
--version-from | 'package.json' | define whether document version will come from the package.json version field or specific file, timestampselect one in package.json , file , timestamp | ||
--version-path | If the versionFrom option set file , read the file from this path | |||
--theme | 'dark' | define the mermaid.js plugin theme. see https://mermaid-js.github.io/mermaid/#/Setup?id=theme select one in default , dark , forest , dark , neutral , null | ||
--route-base-path | define the route base path. The route base path is used as the base path for navbar anchor when generating HTML documents | |||
--title | define what will be written in the HTML document title tag | |||
--prettier-config | define the path to the prettier configuration file | |||
--puppeteer-config | define the path to the puppeteer configuration file | |||
--width | '100%' | define the ER diagram width. The width is defined by the HTML document css attribute width | ||
--viewport-width | 1280 | define the viewport width to puppeteer. The width is defined by the HTML document css attribute width | ||
--viewport-height | 1440 | define the viewport height to puppeteer. The width is defined by the HTML document css attribute height | ||
--image-format | 'svg' | define the format to image file select one in png , svg | ||
--background-color | 'white' | define the background color to html documents eg. transparent, red, '#F0F0F0'. |