Script class final
A script, hook, or shared hook defined under scripts.
Constructors
-
Script({required String name, required String command, String? description, Map<
String, String> env = const {}, String? envFile, List<String> ? runInPackages, String? runHooksFrom, List<String> ? hookTargets, bool all = false, int? concurrency, bool? failFast, bool? dependencyOrder, List<String> dependsOn = const []}) -
const
Properties
- all → bool
-
For
beforeandafter: whether they apply to every hook target.final - command → String
-
final
- concurrency → int?
-
final
- dependencyOrder → bool?
-
final
-
dependsOn
→ List<
String> -
Scripts to run before this one. A name starting with
^runs that script in the workspace packages this script's packages depend on.final - description → String?
-
final
-
env
→ Map<
String, String> -
final
- envFile → String?
-
A dotenv file, relative to the workspace root. env overrides its
variables.
final
- failFast → bool?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hookTargets
→ List<
String> ? -
For
beforeandafter: the hook targets they apply to.final - isHook → bool
-
no setter
- name → String
-
final
- runHooksFrom → String?
-
The script whose hooks this script uses.
final
-
runInPackages
→ List<
String> ? -
Globs or package names that choose the workspace packages to run in.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appliesTo(
String target) → bool -
Whether this shared hook applies to
target. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
checkReferences(
Map< String, Script> scripts, {required String file}) → void -
Checks that every
run_hooks_fromanddepends_onname refers to a script inscripts, and thatdepends_onhas no cycles. Run after the root and package scripts are merged, since either may refer to the other. -
parseAll(
ConfigReader reader) → Map< String, Script>