@proscom/typeorm-uml
Generates UML diagrams for TypeORM projects
Last updated 2 months ago by mayorandrew .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @proscom/typeorm-uml 
SYNC missed versions from official npm registry.

@proscom/typeorm-uml 1.2.0

A command line tool to generate UML diagrams for Typeorm projects. It uses plantuml to render diagrams and outputs an URL to a diagram. It can also output diagram definition in the plnatuml syntax.

This is a fork of https://github.com/eugene-manuilov/typeorm-uml with couple of additional features:

  • output plantuml syntax instead of the url
  • output entity/property or table/column names or both
  • use regexp in include/exclude

Installation

Install this command as a development dependency to your project:

npm i -D @proscom/typeorm-uml
// or
yarn add --dev @proscom/typeorm-uml

Usage

Add a new script to your package.json to be able to run it:

{
    "name": "myproject",
    "scripts": {
        "db:diagram": "typeorm-uml ormconfig.json"
    }
}

Then run npm run db:diagram and you will receive an URL to an image with your diagram. You can use this URL to add to your README file or you can download the image and add it to your repository.

Synopsis

USAGE
  $ typeorm-uml [CONFIGNAME]

ARGUMENTS
  CONFIGNAME  [default: ormconfig.json] Path to the Typeorm config file.

OPTIONS
  -c, --connection=connection  [default: default] The connection name.
  -d, --download=download      The filename where to download the diagram.
  -e, --exclude=exclude        Comma-separated list of entities to exclude from the diagram.
  -f, --format=png|svg|txt     [default: png] The diagram file format.
  -i, --include=include        Comma-separated list of entities to include into the diagram.
  --uml                        Outputs plantuml syntax instead of the url
  --monochrome                 Whether or not to use monochrome colors.

Typescript

If you use .ts entities in your Typeorm config, then run this command with ts-node like this:

ts-node ./node_modules/@proscom/typeorm-uml/bin/run ormconfig.json

Example

typeorm/typescript-example

typeorm-uml --format=svg --monochrome

typeorm/typescript-example

Contribute

Want to help or have a suggestion? Open a new ticket and we can discuss it or submit a pull request.

License

MIT

Current Tags

  • 1.2.0                                ...           latest (2 months ago)

1 Versions

  • 1.2.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |