You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation for templates is rather simple:
❯ spin templates add --help
spin-templates-add 0.1.0
Add a template repository locally
USAGE:
spin templates add [OPTIONS] --name <name>
OPTIONS:
--branch <branch> The optional branch of the git repository
--git <git> The URL of the templates git repository. The templates must be in a git repository in a
"templates" directory
--local <local> Local directory to add as a template
--name <name> The name of the templates repository
Templates can added from:
a git repository with a templates/ directory in the root, containing individual templates as directories
a single local directory
While they are named "templates", there is no templating engine configured, and creating a new application based on a template using spin new will simply copy the contents of the selected "template".
There are a few options for selecting a templating engine - for example, yo-wasm uses EJS, while cargo generate uses the Liquid template language.
(One very interesting approach of cargo generate is allowing template-defined placeholders, which allow for template authors to define custom variables and either get their values through user interaction, or use a supplied default value.)
Ideally, we would pick a templating language and implement support for it with Spin templates.
The text was updated successfully, but these errors were encountered:
The current implementation for templates is rather simple:
Templates can added from:
templates/
directory in the root, containing individual templates as directoriesWhile they are named "templates", there is no templating engine configured, and creating a new application based on a template using
spin new
will simply copy the contents of the selected "template".There are a few options for selecting a templating engine - for example,
yo-wasm
uses EJS, whilecargo generate
uses the Liquid template language.(One very interesting approach of
cargo generate
is allowing template-defined placeholders, which allow for template authors to define custom variables and either get their values through user interaction, or use a supplied default value.)Ideally, we would pick a templating language and implement support for it with Spin templates.
The text was updated successfully, but these errors were encountered: