@quenty/nevermore-template-helpers
v1.11.0
Published
Helpers to generate Nevermore package and game templates
Readme
Nevermore Template Helpers
Shared utilities for scaffolding, building, and template substitution across Nevermore CLI tools.
Modules
| Module | Purpose |
|--------|---------|
| scaffolding/ | TemplateHelper — directory template creation with Handlebars |
| build/ | BuildContext + rojoBuildAsync — sole rojo invocation point for the entire codebase |
| substitution/ | substituteTemplate — Handlebars-based {{VAR}} replacement with noEscape |
Build API
import { BuildContext, rojoBuildAsync, resolveTemplatePath } from '@quenty/nevermore-template-helpers';
// Resolve a template file relative to the calling package's templates/ directory
const projectPath = resolveTemplatePath(import.meta.url, 'my-template/default.project.json');
// Temp directory for build output (auto-cleaned)
const ctx = await BuildContext.createAsync({ mode: 'temp', prefix: 'my-build-' });
const placePath = path.join(ctx.dir, 'output.rbxl');
await rojoBuildAsync({ projectPath, output: placePath });
await ctx.cleanupAsync();Template Substitution
import { substituteTemplate } from '@quenty/nevermore-template-helpers';
const result = substituteTemplate('local PORT = "{{PORT}}"', { PORT: '8080' });
// → 'local PORT = "8080"'Uses Handlebars with noEscape: true so Lua source code (&, <, etc.) is not HTML-escaped.
