Skip to content

Commit

Permalink
Pass the generator as context for ejs.render by default. (#1246)
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 aa57264 commit 3c0ec07
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 3c0ec07

Please sign in to comment.