ConditionalScriptRule
Defined in: policies/ConditionalScripts.ts:29
Configuration for a conditional script requirement.
Properties
Section titled “Properties”ifPresent
Section titled “ifPresent”ifPresent:
string
Defined in: policies/ConditionalScripts.ts:34
The script that triggers the requirement.
If this script exists, then requires must also exist.
requires
Section titled “requires”requires:
ConditionalScriptEntry[]
Defined in: policies/ConditionalScripts.ts:50
Scripts that must be present if ifPresent script exists.
Remarks
Section titled “Remarks”Each entry can be:
- A string: Script must exist, no auto-fix available
- An object
{ scriptName: "default value" }: Script must exist, auto-fix adds the default value if missing
Example
Section titled “Example”requires: ["test", { clean: "rimraf dist" }]