Skip to main content

XpmInitTemplateSubstitutionsVariables interface

Defines the substitution variables used by xpm init templates.

Signature

export interface XpmInitTemplateSubstitutionsVariables

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

properties

Record<string, string | boolean | number>

The resolved template properties.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.