BaseMelosCommand class base

A command class that provides common Melos CLI operations.

This class extends CliCommand and provides methods for:

  • Managing workspace dependencies
  • Cleaning workspaces

Example usage:

class MyMelosCommand extends BaseMelosCommand {
  @override
  Future<void> run(HookContext context) async {
    await bootstrap(
      context: context,
      workspacePath: 'path/to/workspace',
    );
  }
}
Inheritance

Constructors

BaseMelosCommand.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bootstrap({required HookContext context, required String workspacePath}) Future<void>
Run Melos bootstrap to install dependencies
clean({required HookContext context, required String workspacePath}) Future<void>
Clean Melos workspace
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(HookContext context) Future<void>
Run the command with the given HookContext
inherited
toString() String
A string representation of this object.
inherited
trackOperation(HookContext context, {required String startMessage, required String endMessage, required Future<void> operation()}) Future<void>
Track an operation with progress indicator
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited