A 5 minutes tutorial
-
create the folder with the template
mkdir my-template cd my-template -
add file that will be copied as is
cat > file0.txt <<EOF I am file0. EOF -
add a template file that will be "rendered" by the handlebars engine
- the file should have the .ffizer.hbs extension,
- the extension .ffizer.hbs is removed from the generated filename
- Handlebars templating language
cat > file1.txt.ffizer.hbs <<EOF I am file1.txt of {{ project }}. EOF -
add a ffizer configuration file (.ffizer.yaml)
- to list variables
- to list pattern to ignore
variables: - name: project default_value: my-project ignores: - .git # exclude .git of the template host -
add a file with a name that will be "rendered" by the handlebars engine
- the file should have {{ variable }},
- Handlebars templating language
cat > '{{ project }}.txt' <<EOF I am a fixed content file with rendered file name. EOF