layerlens 1.0.7 layerlens: ^1.0.7 copied to clipboard
Generate a dependency diagram in every folder of your source code.
LayerLens #
Generate dependency diagrams in every folder of your source code as Mermaid flowchart
documents.
Disclaimer #
This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.
Prerequisites #
To see the diagrams in IDE:
-
VSCode: install
Markdown Preview Mermaid Support
extension -
Android Studio: enable the "Mermaid" extension in the Markdown language settings
Generate diagrams #
- Add a
dev_dependency
to https://pub.dev/packages/layerlens - Run
dart pub get
orflutter pub get
- Run
dart run layerlens
- Find the generated file DEPENDENCIES.md in a source folder
- In VSCode, right click the file and select 'Open Preview'
CI: re-generate on every GitHub push #
To make GitHub re-generating the diagrams after every push,
copy content of run-layerlens.yaml
to .github/workflows
.
Alert on circular references #
You may want to avoid circular references, because:
- Method contracts are easier to understand
- Treeshaking (i.e. not includine non-used code into build) is more efficient
- Incremental build is faster
If you want presubmit alerting for circular references, upvote the issue and explain why you want it.
Supported languages #
While layerlens concepts are language agnostic, for now only dart
is supported.
Please submit an issue, if you want other language to be added.
Contribute to layerlens #
See CONTRIBUTING.md
for details.
License #
Apache 2.0; see LICENSE
for details.