Closed jlnrrg closed 10 months ago
Hi @jlnrrg, thanks for the kind words! Thank you for your suggestion.
Did you know that you can run lakos
from any project subfolder and not just from the project root folder? For example:
cd /your/project
lakos ./lib/src/some_module | dot -Tpng -Gdpi=200 -o some_module.png
This way, you can explore the subfolders of a large project one by one and maybe generate a diagram for each subfolder.
You can also try inverting the ignore glob by putting a !
in front of it like this:
lakos . -i !test/**
Although that seems like a no-op. But maybe you can make this idea work as an "include" if you're better at glob patterns than I am :)
Please let me know if either of these ideas works for you.
I already figured out the subfolder part, but the negative glob part is new to me, so I'll have to try that out.
I highly doubt that it could work the way i intend. But let me give some more insight:
Let's assume we have a root folder with 10 different subfolders. Now I only want to include the "data" and "domain" folder in the diagram. As I can't specify more than one folder to look at, I have to choose the root folder, so both get recognised. Then the ignore statement has to include all other 8 folders, so they don't pollute the result. (In each of the folders are "*/_model*" files which have to be ignored, so I already need a positive glob statement)
I would be happy about some guidance, how this could be achieved without a massive ignore glob 😅.
(I will experiment with glob, and post if I find an easier way 🤝)
On Sat, 21 Oct 2023, 03:32 OlegAlexander, @.***> wrote:
Hi @jlnrrg https://github.com/jlnrrg, thanks for the kind words! Thank you for your suggestion.
Did you know that you can run lakos from any project subfolder and not just from the project root folder? For example:
cd /your/projectlakos ./lib/src/some_module | dot -Tpng -Gdpi=200 -o some_module.png
This way, you can explore the subfolders of a large project one by one and maybe generate a diagram for each subfolder.
You can also try inverting the ignore glob by putting a ! in front of it like this:
lakos . -i !test/**
Although that seems like a no-op. But maybe you can make this idea work as an "include" if you're better at glob patterns than I am :)
Please let me know if either of these ideas works for you.
— Reply to this email directly, view it on GitHub https://github.com/OlegAlexander/lakos/issues/13#issuecomment-1773589697, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASNWQHNOBTXVXFATZRHR7TLYAMQ4TAVCNFSM6AAAAAA6IY4VU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTGU4DSNRZG4 . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for the context. I am playing around with the negative ignore. So far, I figured out that this pattern ignores everything:
lakos -i "**" .
I tried out a few different globs with https://globster.xyz/.
In the end I found /myapp/!(@(config|assets|))/**
which includes everything apart from the written down strings.
Thing is, it seems that this type of glob syntax is not fully supported by lakos.
Do you by chance have an overview which glob functionality is supported 🙏
Ok, I took a look at the documentation of glob which you also used. And as I feared... such syntax is not supported 😞
Yes, I'm using the glob
library, but it seems they don't support the full glob syntax 😢. If you don't mind, I'm going to close this issue.
Thank you for this awesome package. It is exactly what I need in my current situation.
One thing which might increase the convenience of this package is the introduction of an include flag.
This could behave reversed to the ignore flag. With ignore you have to list everything that you do not want to have included. For very large code bases this ignore statement can thus get very long. An inlude flag could solve this issue by taking the reverse approach and ony anayzing globs that fullfill the include statement.