Built-in Variables
List of variables available in the template. You need to be aware that the file name and the variables available in the template body are different.
Template title#
The variables available in the template title are as follows:
key | description | example |
---|---|---|
cwd | Current working directory. | /path/to/ |
inputs | The object value received at the prompt. | |
document.name | The document name. | hello |
document.dir | The directory name of the document file. | /path/to/.scaffdog |
document.path | The path of the document file. | /path/to/.scaffdog/hello.md |
Template body#
The variables available in the template body are as follows:
key | description | example |
---|---|---|
cwd | Current working directory. | /path/to/ |
inputs | The object value received at the prompt. | |
output.root | The root directory name of the output destination. | src |
output.name | The name of the output destination file excluding the extension. | scaffdog |
output.base | The name of the output destination file including the extension. | scaffdog.js |
output.ext | The destination file name extension. | .js |
output.dir | The destination directory name. | src |
output.path | The path of the destination file. | src/scaffdog.js |
output.abs | The absolute path of the destination file. | /path/to/src/scaffdog.js |
document.name | The document name. | hello |
document.dir | The directory name of the document file. | /path/to/.scaffdog |
document.path | The path of the document file. | /path/to/.scaffdog/hello.md |
Edit this page on GitHub
Last edited on