template_generate

Function template_generate 

Source
pub async fn template_generate(
    template_path: String,
    vars: Option<String>,
    manifest_path: Option<String>,
) -> Result<RunResult>
Expand description

Generate code from a template

§Arguments

  • template_path - Path to template file
  • vars - Optional variable map for template rendering (as JSON string)
  • manifest_path - Optional path to ggen.toml manifest

§Example

await templateGenerate('service.tmpl', JSON.stringify({ name: 'api' }));