Script class
- Annotations
-
- @immutable
Constructors
-
Script({required String name, required String run, String? description, Map<
String, String> env = const {}, PackageFilters? packageFilters, ExecOptions? exec}) -
const
- Script.fromYaml(Object yaml, {required String name, required String workspacePath})
-
factory
Properties
- description → String?
-
A short description, shown when using
melos run
with no argument.final -
env
→ Map<
String, String> -
Environment variables that will be passed to run.
final
- exec → ExecOptions?
-
The options for
melos exec
, if run should be executed in multiple packages.final - hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
A unique identifier for the script.
final
- packageFilters → PackageFilters?
-
If the run command is a melos command, allows filtering packages that
will execute the command.
final
- run → String
-
The command specified by the user.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
command(
[List< String> ? extraArgs]) → List<String> - Returns the full command to run when executing this script.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< Object?, Object?> -
toString(
) → String -
A string representation of this object.
override
-
validate(
) → void - Validates the script. Throws a MelosConfigException if the script is invalid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
execOptionsFromYaml(
Map< Object?, Object?> yaml, {required String scriptName}) → ExecOptions