diff --git a/lib/runActions.js b/lib/runActions.js index 7c8132c..609e843 100644 --- a/lib/runActions.js +++ b/lib/runActions.js @@ -68,9 +68,16 @@ module.exports = async (config, context) => { transformer.render( contents, config.transformerOptions, - Object.assign({}, context.answers, { - context - }) + Object.assign( + {}, + context.answers, + typeof config.templateData === 'function' + ? config.templateData.call(context, context) + : config.templateData, + { + context + } + ) ).body ) })