Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tplant

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tplant

Typescript to PlantUML

  • 3.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

tplant

Typescript to UML (PlantUML)

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

Usage

Install

npm install --global 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.

-A, --associations

Show associations between classes with cardinalities
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

-f, --format mermaid

By default it is plantuml If mermaid is specific, then the class diagram is generated for mermaidjs

--targetClass MyClass

If specified will generated the hierarchy class diagram of the specified class

Graphviz

For generating images may need to install graphviz or update to most recent version.

References

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

Keywords

FAQs

Package last updated on 20 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc