The render
command will load the manifest, prompt the user for input to resolve specified variables and render the files in the template.
Generally the renderer will render into the current directory. So before you render, make sure you’re in the directory that you want the project to render:
cd $HOME/Code
As a general warning, if you’re rendering a template into a version controlled application, be sure to commit your changes before rendering, just in case the rendered content is not exactly where you want it to be.
To render a template run:
archetype render
You will be presented with an interactive list of template names to choose from:
Please choose manifest (Press ↑/↓/←/→ arrow to move and Enter to select)
‣ go_module
bash_script
rails_mono_app_module
rails_mono_app_client
rails_mono_app
rails_mono_app_ui_engine
Pick the template you wish to open and press ENTER
. This will start the rendering process on the selected manifest.
You may also provide a --name
option that will bypass the template choice. This requires the precise name of the template:
archetype render --name bash_script
In the event the template is not found or does not exist, then an error message will be displayed signifying that AppArchetype was unable to find the specified template:
archetype render --name nope
✖ ERROR: Unable to find manifest nope
When the manifest is found and loaded successfully, you will be prompted for values that satisfy the variables:
• script_description (Short sentence describing purpose of the script)
Enter value for `script_description` variable:
The prompt may appear several times until the template manager has enough information to successfully render the template.
Please choose manifest bash_script
• script_description (Short sentence describing purpose of the script)
Enter value for `script_description` variable: Quick test of the renderer
• script_name (Name of script)
Enter value for `script_name` variable: test
CREATE dir -> $HOME/Code
RENDER hbs ->: $HOME/Code/test.hbs
✔ Rendered bash_script to $HOME/Code
At this point the template will render into your current location.