Skip to main content

InitTemplateSubstitutionsVariables interface

Defines the substitution variables used by xpm init templates.

Signature​

export interface InitTemplateSubstitutionsVariables

Remarks​

Substitution variables provide the context for Liquid template processing during project initialization. All collected property values and additional template-specific variables are accessible in template files.

Variable structure:

  • properties: Contains all user-provided or default values from the template property definitions, accessible via {{ properties.propertyName }} in template files.
  • Additional variables: Templates can define custom variables for reuse across multiple files or for computed values based on properties.

Template files (with .liquid extension) are processed with this context, allowing conditional content, loops, and value substitution. Non-template files are copied as-is without processing.

Example template usage:

Project name: {{ properties.name }}
{% if properties.language == "cpp" %}
Language: C++
{% endif %}

Properties​

Property

Modifiers

Type

Description

matrix?

Record<string, string | string[] | boolean | number>

(Optional) The resolved template properties.


Generated via tsdoc2docusaurus 1.3.2 by API Extractor/Documenter 7.57.2.