Export built-in templates for customization. Creates .dt-templates directory with Handlebars templates.
Exports built-in templates for customization into a local directory for editing.
/plugin marketplace add deepaktiwari09/dt-workspace-plugin/plugin install dt-workspace@dt-workspace-marketplace[--preset <preset>]Export built-in Handlebars templates to .dt-templates/ for customization.
If --preset argument provided, use it. Otherwise, use AskUserQuestion:
Check if .dt-templates/<preset>/ exists:
mkdir -p .dt-templates/<preset>
Create Handlebars templates for the preset. Each preset needs:
template.config.json:
{
"preset": "<preset>",
"description": "Preset description",
"documentTypes": [...],
"platformDocumentTypes": [...],
"featureTemplate": "feature-file.hbs",
"mainReadmeTemplate": "main-readme.hbs"
}
Common templates:
Preset-specific templates:
TEMPLATES EXPORTED
Location: .dt-templates/<preset>/
Files: X templates
Template files:
- template.config.json
- module-readme.hbs
- api-contracts.hbs
- ...
Usage:
1. Edit templates in .dt-templates/<preset>/
2. Run /dt-workspace:scaffold - custom templates auto-used
3. Only override templates you need to change
Templates use Handlebars syntax with variables:
{{module.id}}, {{module.name}}, {{module.description}}{{module.features}}, {{module.services}}, {{module.databases}}{{preset}}, {{projectName}}Helpers:
{{capitalize text}} - kebab-case to Title Case{{add index 1}} - arithmetic{{#if}}, {{#each}}, {{#eq}} - conditionals