ScriptRunner class

Service for running scripts defined in pubspec.yaml

Constructors

ScriptRunner()

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

findMatchingScripts(String query, Map<String, String> scripts) → List<String>
Get all matching scripts for ambiguous query
findPubspec([String? startDir]) → File?
Find the nearest pubspec.yaml by walking up the directory tree
findScript(String query, Map<String, String> scripts) → String?
Find a script by name (supports fuzzy matching)
getProjectName([String? pubspecPath]) → String?
Get project name from pubspec.yaml
getScripts([String? pubspecPath]) → Map<String, String>
Parse scripts from pubspec.yaml
listScripts() → void
Print all available scripts
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(String scriptName, {bool showCommand = true}) → Future<int>
Run a script by name
runStreaming(String scriptName) → Future<int>
Run a script with live output streaming
toString() → String
A string representation of this object.
inherited

Operators

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