Each example folder contains:
- Minimalistic sample configuration files.
- A simple
runme
executable script, showing the command line required to run the example. - Expected output (stdout) in
output.txt
, and in case the command generates a file or a folder, it will be placed inresult
.
To run the examples:
$ cd examples/<selected example>
$ ./runme
- Variables
Showing the use of%{variables}
. - Variables in Filenames
Showing the use of%{variables}
in filenames. - Import
Showing the use of@import
. - One to Many - Config from File
Showing the use of thekojo config
command to generate several output files from the same source template. - Many to Many - Config from Directory
Showing the use of thekojo config
command to generate several output directories from the same source directory. - Other File Types
Showing how kojo is used on other types of files. - Nested Import Commands
Showing how@import
can be used to reference files in other folders. - Save to File
Showing how to save output to a file. - One to Many
Showing how to generate multiple files from a single source template usingkojo config
. - Cascading Variables
Showing how variables are forwarded from top to bottom. - Compile Directory
Showing how to compile a directory of templates and create a similar output directory usingkojo dir
. - Compile Directory and Save
Same as theCompile Directory
example, but saving the output to a new directory. - Arguments from File - file command
Showing how to provide arguments from a file tokojo file
. - Arguments from File - config command
Showing how to provide arguments from a file tokojo config
. - Arguments from File - dir command
Showing how to provide arguments from a file tokojo dir
. - ERB
Showing how to use ERB for conditional output. - Interactive Form Templates
Showing how to use ERB/ERBX templates with built in interactivity prompt.