lakos library

In addition to the command line tool, lakos can also be used as a library.

Use buildModel to construct a Model object.

Use Model.getOutput to print the model in dot or JSON format.

Use Model.toDirectedGraph for further analysis with the directed_graph library.

See example/example.dart.

Classes

Edge
Import/Export dependencies are represented as edges in a directed graph.
Metrics
Stores global metrics. See the README for more details about each metric.
Model
The main container class to hold the data model. Returned from the buildModel function.
Node
Dart files are represented as nodes in a directed graph. See the README for more details about each node metric.
Subgraph
Subfolders are represented as subgraphs.

Enums

Directive
Import/Export directive used in Edge.
OutputFormat
Used in Model.getOutput.

Functions

buildModel(Directory rootDir, {String ignoreGlob = '!**', bool showTree = true, bool showMetrics = false, bool showNodeMetrics = false}) Model
This is the main function for API usage. Returns a Model object.

Exceptions / Errors

PubspecYamlNotFoundException
Thrown by buildModel if pubspec.yaml can't be found in or above the rootDir.