This repo contains a few scripts to parse and summarize TS code (primarily to then use as prompt input for LLMs):
command | desscription |
---|---|
npm start -- /path/to/an/angular/app |
|
DIRECTORY=~/Development/asteroids-p5-ts/ \ |
generates a UML class diagram in DOT format from a directory of TypeScript files. |
DIRECTORY=~/Development/asteroids-p5-ts/ \ |
generates a UML class diagram in DOT format from a directory of TypeScript files. |
- Node.js v14 or later
- Graphviz (https://graphviz.org/)
- Clone this repository or download the source code.
- Install the dependencies by running
npm install
in the project directory.
To generate a UML diagram, run the following command in the project directory:
DIRECTORY=~/Development/video-text-prompt npm run generate-uml
Replace DIRECTORY=path
with the path to the directory containing your TypeScript files.
The command will generate an output.png file in the project directory.
See the examples for some sample output of each script
- The app assumes that each TypeScript file contains exactly one class.
- The app does not handle circular references between classes.
This project is licensed under the MIT License. See LICENSE file for details.