Skip to content

size_analyzer Pro

Flutter --analyze-size report parser with develop baseline diffing. Adds the size-analyzer command to the base monorepo_toolkit.

Version: 1.0.0

Variables

VariableTypeDefaultDescription
appNamestringMyAppThe name of your application
isForMonorepobooleantrueWhether this is being generated as part of a monorepo

Usage

Interactive

bash
archipelago generate size_analyzer

Non-interactive (CI)

bash
archipelago generate size_analyzer --config my_config.json

Config Template

json
{
  "@appName": "The name of your application",
  "appName": "MyApp",
  "@isForMonorepo": "Whether this is being generated as part of a monorepo",
  "isForMonorepo": true
}

Generated Structure

devtools/
└── scripts/
    └── size_analyzer/
        ├── lib/
        │   ├── size_analyzer.dart
        │   └── src/
        │       ├── commands/
        │       │   ├── analyze_command.dart
        │       │   ├── size_analyzer_command.dart
        │       │   └── update_baseline_command.dart
        │       ├── models/
        │       │   └── size_node.dart
        │       ├── reporters/
        │       │   └── size_metrics_reporter.dart
        │       └── services/
        │           └── size_analyzer_service.dart
        └── pubspec.yaml
size_baseline/
├── android.json  # committed baseline
└── ios.json      # committed baseline

The post_gen hook registers the size-analyzer command in monorepo_toolkit's command runner and scaffolds the size_baseline/ directory with empty baseline files at the workspace root.

Built by Banua Coder