tplant icon indicating copy to clipboard operation
tplant copied to clipboard

svg file (or puml file) only contains one box

Open MappingSteve opened this issue 4 years ago • 2 comments

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 avatar Oct 13 '20 23:10 MappingSteve

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.

MappingSteve avatar Oct 13 '20 23:10 MappingSteve

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).

BillyBobFry avatar Feb 25 '22 12:02 BillyBobFry