bafolts / tplant

Typescript to plantuml
https://segmentationfaults.com/tplant/default.html
GNU General Public License v3.0
267 stars 34 forks source link

svg file (or puml file) only contains one box #61

Open MappingSteve opened 3 years ago

MappingSteve commented 3 years ago

E.g.

tplant --input test/Playground/Inheritance/*.ts --output test/Playground/Inheritance.svg

results in a single box, that describes the Animal class.

tplant --input test/Playground/Inheritance/*.ts --output test/Playground/Inheritance.puml

results in:

@startuml class Animal { +name: string +move(distanceInMeters?: number): void } @enduml

Presumably there should be other boxes, such as Horse.

Running on Win 10, via MINGW64 git-bash terminal window.

MappingSteve commented 3 years ago

UPDATE: I discovered that specifying Horse.ts does better:

tplant --input test/Playground/Inheritance/Horse.ts --output test/Playground/Horse.puml

outputs:

@startuml class Animal { +name: string +move(distanceInMeters?: number): void } class Horse extends Animal { +move(distanceInMeters?: number): void } @enduml

Likewise, ".svg" output shows two boxes, with arrow from Horse to Animal.

BillyBobFry commented 2 years ago

You need to wrap your glob in single quotes: tplant --input 'test/Playground/Inheritance/*.ts' --output test/Playground/Inheritance.svg

This is because your shell is immediately converting the glob string to the first matching file (test/Playground/Inheritance/Animal.ts).