Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > IPhase

IPhase interface

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Metadata about a phase.

Signature:

export interface IPhase 

Properties

Property

Modifiers

Type

Description

allowWarningsOnSuccess

boolean

(ALPHA) By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to true, Rush will return a zero exit code if warnings occur during the execution of this phase.

associatedParameters

Set<CommandLineParameter>

(ALPHA) The set of custom command line parameters that are relevant to this phase.

dependencies

{ self: Set<IPhase>; upstream: Set<IPhase>; }

(ALPHA) The resolved dependencies of the phase

isSynthetic

boolean

(ALPHA) If set to true, this this phase was generated from a bulk command, and was not explicitly defined in the command-line.json file.

logFilenameIdentifier

string

(ALPHA) This property is used in the name of the filename for the logs generated by this phase. This is a filesystem-safe version of the phase name. For example, a phase with name _phase:compile has a logFilenameIdentifier of _phase_compile.

missingScriptBehavior

PhaseBehaviorForMissingScript

(ALPHA) What should happen if the script is not defined in a project's package.json scripts field. Default is "error".

name

string

(ALPHA) The name of this phase.

shellCommand?

string

(ALPHA) (Optional) (Optional) If the shellCommand field is set for a bulk command, Rush will invoke it for each selected project; otherwise, Rush will invoke the package.json "scripts" entry matching Rush command/phase name.

This string is the path to a script that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. If custom parameters are associated with this command, their values will be appended to the end of this string.