Skip to main content

PresetDefinition

Presetter Types API v8.3.0


Presetter Types API / PresetDefinition

Interface: PresetDefinition

Defined in: preset.ts:26

defines a preset with optional name, variables, scripts, assets, and an override for a second-pass merge

Properties

extends?

optional extends?: Preset[]

Defined in: preset.ts:28

optional list of presets to extend


id

id: string

Defined in: preset.ts:30

optional name, typically used for debugging purposes


root?

optional root?: string

Defined in: preset.ts:32

optional root path of the preset package for binary resolution


variables?

optional variables?: PresetContent<Variables>

Defined in: preset.ts:35

substitution variables used within the preset


scripts?

optional scripts?: PresetContent<Scripts>

Defined in: preset.ts:38

additional scripts to be executed within the preset


assets?

optional assets?: PresetObject<PresetAssets>

Defined in: preset.ts:41

collection of assets associated with the preset


override?

optional override?: object

Defined in: preset.ts:47

secondary pass for asset resolution, allowing modifications post initial asset formation this can be used to append content to config files or handle conflicts in content

variables?

optional variables?: PresetContent<Variables>

plain object or generator function used in the second-pass merge to resolve variable conflicts

scripts?

optional scripts?: PresetContent<Scripts>

plain object or generator function used in the second-pass merge to resolve script conflicts

assets?

optional assets?: PresetObject<PresetAssets>

asset content, allowing for modifications in the second-pass merge