Typescript to PlantUML
npm install tplantWill convert a Typescript file to UML diagram. Following all inheritances.
shell
npm install --global tplant
`$3
`shell
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$3
`shell
tplant --input test/Playground/*/.ts --output test/Playground/Playground.puml
tplant --input test/Playground/Classes/Greeter.ts --output test/Playground/Classes/Greeter.puml
`Options
$3
Define the path of the Typescript file$3
Define the path of the output file. If not defined, it'll output on the STDOUT$3
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.$3
Show associations between classes with cardinalities
Example:
`typescript
class Wheel {
public size: number;
}
class Car {
public wheel: Wheel[];
}
`
`plantuml
@startuml
class Wheel {
+size: number
}
class Car {
+wheel: Wheel
}
Car --> "*" Wheel
@enduml
`
$3
Only convert interfaces$3
By default it is
plantuml
If mermaid` is specific, then the class diagram is generated for mermaidjsIf specified will generated the hierarchy class diagram of the specified class
For generating images may need to install graphviz or update to most recent version.