CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/nx-plugin-toolkit

Complete Nx plugin development toolkit: create custom generators, executors, and extend Nx workspaces with reusable automation

93

1.00x
Quality

94%

Does it follow best practices?

Impact

92%

1.00x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

template-engine-guide.mdnx-plugin-authoring/references/

Template Engine Guide

Use this reference when creating and maintaining generator template files.

Template Basics

  • Store templates under files/ in the generator directory.
  • Use .template file suffix for rendered outputs.
  • Include tmpl: "" in template variables to strip .template suffix.

EJS Variable Examples

const templateVars = {
  ...schema,
  ...names(schema.name),
  tmpl: "",
};
export const <%= propertyName %> = "<%= name %>";

Reusable Template Patterns

  • Keep shared snippets small and composable.
  • Prefer explicit variable names over implicit assumptions.
  • Separate structure templates (directories/files) from configuration mutation logic.

Troubleshooting

  • Unreplaced variables usually mean missing keys in templateVars.
  • Incorrect filenames often mean missing tmpl: "" mapping.

tile.json