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:

keydescriptionexample
cwdCurrent working directory./path/to/
inputsThe object value received at the prompt.
document.nameThe document name.hello
document.dirThe directory name of the document file./path/to/.scaffdog
document.pathThe path of the document file./path/to/.scaffdog/hello.md

Template body#

The variables available in the template body are as follows:

keydescriptionexample
cwdCurrent working directory./path/to/
inputsThe object value received at the prompt.
output.rootThe root directory name of the output destination.src
output.nameThe name of the output destination file excluding the extension.scaffdog
output.baseThe name of the output destination file including the extension.scaffdog.js
output.extThe destination file name extension..js
output.dirThe destination directory name.src
output.pathThe path of the destination file.src/scaffdog.js
output.absThe absolute path of the destination file./path/to/src/scaffdog.js
document.nameThe document name.hello
document.dirThe directory name of the document file./path/to/.scaffdog
document.pathThe path of the document file./path/to/.scaffdog/hello.md
Edit this page on GitHub

Last edited on

Copyright © 2022 wadackel

Released under the MIT License

Built with Next.js

Source Code