TsUML2 icon indicating copy to clipboard operation
TsUML2 copied to clipboard

Some files seem to be ignored by the glob pattern

Open joaonevesvisualnuts opened this issue 3 years ago • 2 comments

Command: tsuml2 --glob \"./src/**/!(*.d|*.spec).ts\" It's currently showing very few of the interfaces I have defined, I'm not sure why...

joaonevesvisualnuts avatar Oct 22 '22 12:10 joaonevesvisualnuts

Can you provide a minimal example that reproduces the problem?

demike avatar Oct 25 '22 06:10 demike

I think it has to do with the package I'm building. It's a little bit hard to explain, but I think because I export all the interfaces/classes in the same object, it bundles them all together into a default entity in the diagram. For example, let's say I have this folder structure:

> package
> > index.ts <---- bundles all the classes together into an object
> > type1Classes
> > > Class1.ts <--- class that contains function x1()
> > type2Classes
> > > Class2.ts <--- class that contains function x2()

And index.ts is something like this:

const package = {
    Class1: require('type1Classes/Class1'),
    Class2: require('type2Classes/Class2')
};
export default package;

Then when I run tsuml2 --glob \"./package/**/!(*.d|*.spec).ts\" I get one of the entities in the diagram looking like this:

default:
   x1()
   x2()

Maybe it doesn't distinguish objects from classes or something?

joaonevesvisualnuts avatar Oct 27 '22 12:10 joaonevesvisualnuts