Script class
- Annotations
-
- @immutable
Constructors
-
Script({required String name, String? run, String? description, Map<
String, String> env = const {}, PackageFilters? packageFilters, ExecOptions? exec, List<String> ? steps = const []}) -
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
-
steps
→ List<
String> ? -
A list of individual command steps to be executed as part of this script.
Each string in the list represents a separate command to be run.
These steps are executed in sequence. This is an alternative to
specifying a single command in the run variable. If steps is
provided, run should not be used.
final
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