version: 1.0.0 template: engine: handlebars path: "./templates" extension: ".boiler" data: # - name: appName [This data value will be set to $APP_NAME automatically, don't use it] # type: string # message: "Enter your app name: " # required: false # defaultValue: $APP_NAME - name: anyNumber type: number message: "Enter any number: " required: false defaultValue: 0 - name: isPrivate type: bool message: "Is it a private project?" required: false defaultValue: false - name: listValue type: array[number] message: "Enter multiple numbers: " required: true - name: listValue2 type: array[string] message: "Enter multiple strings: " required: true - name: license type: string values: - MIT - APACHE message: "Choose license [MIT, APACHE]: " required: false defaultValue: MIT - name: chooseNumberOneToFive type: number values: - 1 - 2 - 3 - 4 - 5 message: "Choose a number from 1 to 5: " required: false defaultValue: 1 - name: appVersion type: semver message: "Please enter initial app version: " required: false defaultValue: "1.0.0" files: ./src/a-with-cond: "{{ cond }}" ./src/a-with-cond/b-with-cond2: "{{ and cond cond2 }}" ./src/a-with-cond/b-without-cond2: "{{ and cond (not cond2) }}" ./src/a-without-cond: "{{ not cond }}" ./src/a-without-cond/b-with-cond2: "{{ and (not cond) cond2 }}" ./src/a-without-cond/b-without-cond2: "{{ and (not cond) (not cond2) }}" files1: ./README: check: "{{ cond }}" newName: "README.md" ./src: check: "{{ cond }}" ./src/a-with-cond: check: "{{ cond }}" newName: "a" ./src/a-with-cond/b-with-cond2: check: "{{ and cond cond2 }}" newName: "b" ./src/a-with-cond/b-without-cond2: check: "{{ and cond (not cond2) }}" newName: "b" ./src/a-without-cond: check: "{{ not cond }}" newName: "a" ./src/a-without-cond/b-with-cond2: check: "{{ and (not cond) cond2 }}" newName: b ./src/a-without-cond/b-without-cond2: check: "{{ and (not cond) (not cond2) }}" newName: "b" files2: ./src/a-with-cond: check: "{{ cond }}" newName: "a-{{ appName }}" ./src/a-with-cond/b-with-cond2: check: "{{ and cond cond2 }}" newName: "b-{{ appName }}" ./src/a-with-cond/b-without-cond2: check: "{{ and cond (not cond2) }}" newName: "b-{{ appName }}" ./src/a-without-cond: check: "{{ not cond }}" newName: "a-{{ appName }}" ./src/a-without-cond/b-with-cond2: check: "{{ and (not cond) cond2 }}" newName: "b-{{ appName }}" ./src/a-without-cond/b-without-cond2: check: "{{ and (not cond) (not cond2) }}" newName: "b-{{ appName }}" files3: ./src/a-with-cond/: check: "{{ cond }}" newName: "a-{{ appName }}" ./src/a-with-cond/b-with-cond2: check: "{{ and cond cond2 }}" newName: "b-{{ appName }}" src/a-with-cond/b-with-cond2/op.js: check: "{{ and cond (and cond2 cond3) }}" newName: op2222.js ./src/a-with-cond/b-without-cond2: check: "{{ and cond (not cond2) }}" newName: "b-{{ appName }}" ./src/a-without-cond: check: "{{ not cond }}" newName: "a-{{ appName }}" ./src/a-without-cond/b-with-cond2: check: "{{ and (not cond) cond2 }}" newName: "b-{{ appName }}" ./src/a-without-cond/b-without-cond2: check: "{{ and (not cond) (not cond2) }}" newName: "b-{{ appName }}" postGenerate: "single command ${appVersion}" postGenerate2: - 'echo "I can use template data here: $appName"' - "command2" postGenerate3: all: "single command" macos: "single command" windows: "single command" linux: "single command" postGenerate4: all: "command1" macos + linux: "command1" windows: "command1" postGenerate5: all: - "command1" - "command2" macos: - "command1" - "command2" windows: - "command1" - "command2" linux: - "command1" - "command2" - | set -e errcho() { >&2 echo "$@" } errcho "Hello, world!" errcho "Goodbye, world!" helpText: >- This is a very long sentence that spans several lines in the YAML but which will be rendered as a string with NO carriage returns. helpText1: - "text1" - "text2" helpText2: all: "single text" macos: "single text" windows: "single text" linux: "single text" helpText3: all: - "text1" - "text2" macos + linux: - "text1 for macos and linux" - "text2 for macos and linux" windows: - "text1" - "text2"