Skip to content

Instantly share code, notes, and snippets.

@isurfer21
Created April 17, 2024 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isurfer21/b54f8ff7ba74c522961e4a1b7efcc417 to your computer and use it in GitHub Desktop.
Save isurfer21/b54f8ff7ba74c522961e4a1b7efcc417 to your computer and use it in GitHub Desktop.
Wrapper to generate UML from TypeScript files using TsUML2 (npm i -g tsuml2) to output an image file with the same filename as the input file.
#!/usr/bin/env bash
if [[ $# -gt 0 ]]
then
filename=$1
tsuml2 --glob $filename -m -o $filename.svg
else
echo "Error: arguments missing!"
echo "Syntax: uml <filename>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment