Part of #12
As a qctl user, I want the official templates in templates-hub to use Velocity syntax so that I can create projects with the new template engine.
qqq-web-api
qqq-cli-tool
qqq-batch
qqq-full-stack
template.yaml
qctl qqq init
Before (Handlebars):
package {{packageName}}; public class {{pascalCase appName}}App { private static final String NAME = "{{appName}}"; }
After (Velocity):
package $packageName; public class ${str.pascal($appName)}App { private static final String NAME = "$appName"; }
Before:
template/ src/main/java/com/example/{{projectName}}/
After:
template/ src/main/java/com/example/template/ # Static path # In template.yaml: transforms: - type: move from: "src/main/java/com/example/template" to: "src/main/java/${packagePath}"
qqq-web-api/template.yaml
qqq-web-api/template/**/*.java
qqq-cli-tool/template.yaml
qqq-cli-tool/template/**/*.java
qqq-batch/template.yaml
qqq-full-stack/template.yaml
qctl qqq init <template>
Migration verified complete:
$str.replace($packageName, '.', '/')
$variable
${variable}
{{ }}
No dependencies set.
The note is not visible to the blocked user.
Part of #12
User Story
As a qctl user, I want the official templates in templates-hub to use Velocity syntax so that I can create projects with the new template engine.
Design
Templates to Migrate
qqq-web-apiqqq-cli-toolqqq-batchqqq-full-stackMigration Steps Per Template
template.yamlto schema v2qctl qqq initSyntax Conversion Examples
Before (Handlebars):
After (Velocity):
Directory Structure
Before:
After:
Files to Create/Modify
qqq-web-api/template.yamlqqq-web-api/template/**/*.javaqqq-cli-tool/template.yamlqqq-cli-tool/template/**/*.javaqqq-batch/template.yamlqqq-full-stack/template.yamlImplementation Tasks
qqq-web-apimanifest to v2 schemaqqq-web-apitemplate files to Velocityqqq-web-apiend-to-endqqq-cli-toolqqq-batchqqq-full-stackAcceptance Criteria
qctl qqq init <template>works for all templatesMigration verified complete:
$str.replace($packageName, '.', '/'))$variableand${variable}){{ }}) found in any template filesqctl qqq init- variables render correctly, project compiles successfully