2.6.1 • Published 4 years ago

@jeff-tian/tplant v2.6.1

Weekly downloads
16
License
ISC
Repository
github
Last release
4 years ago

tplant

Typescript to UML (PlantUML)

Will convert a Typescript file to UML diagram. Following all inheritances.

Build Status codecov Build status Git commit with emojis!

Quality gate

Usage

Install

npm install --global @jeff-tian/tplant

Generate image file (svg or png)

tplant --input test/Playground/**/*.ts --output test/Playground/Playground.svg
tplant --input test/Playground/Classes/Greeter.ts --output test/Playground/Classes/Greeter.png

Internet connection is required

Generate puml file

tplant --input test/Playground/**/*.ts --output test/Playground/Playground.puml
tplant --input test/Playground/Classes/Greeter.ts --output test/Playground/Classes/Greeter.puml

Options

-i, --input

Define the path of the Typescript file

-o, --output

Define the path of the output file. If not defined, it'll output on the STDOUT

-p, --project

Compile a project given a valid configuration file.
The argument can be a file path to a valid JSON configuration file, or a directory path to a directory containing a tsconfig.json file.

-C, --compositions

Create not heritage compositions.
Example:
class Wheel {
  public size: number;
}
class Car {
  public wheel: Wheel;
}
@startuml
class Wheel {
    +size: number
}
class Car {
    +wheel: Wheel
}
Car *-- Wheel
@enduml

-I, --only-interfaces

Only convert interfaces

References

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API

2.6.1

4 years ago

2.6.0

4 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.0

4 years ago

2.5.1

4 years ago

2.4.7

4 years ago

2.4.3

4 years ago

2.4.5

4 years ago

2.4.4

4 years ago

2.4.6

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.19

4 years ago

2.3.18

4 years ago