Skip to content

Commit

Permalink
Pass the generator as context for ejs.render by default.
Browse files Browse the repository at this point in the history
Requires an updated version of mem-fs-editor.
  • Loading branch information
mshima committed Jun 4, 2020
1 parent cbd5be9 commit 074289a
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 43 deletions.
2 changes: 2 additions & 0 deletions lib/actions/fs.js
Expand Up @@ -159,6 +159,8 @@ fs.renderTemplate = function(
templateData = this._templateData(templateData);
}

templateOptions = { context: this, ...templateOptions };

source = Array.isArray(source) ? source : [source];
const templatePath = this.templatePath(...source);
destination = Array.isArray(destination) ? destination : [destination];
Expand Down

0 comments on commit 074289a

Please sign in to comment.