Reputation: 5476
I'm starting create my own yeoman generator.
According this article, I want to write some content to the html file. I use the following code:
writing: function() {
this.fs.copyTpl(
this.templatePath("index.html"),
this.destinationPath("public/index.html"),
{ title: "My template" }
);
}
But when I run my generator, I have the error : TypeError: Object [object Object] has no method 'templatePath'
My yeoman version is 1.4.7 and yeoman-generator version is 0.17.7
Upvotes: 2
Views: 101
Reputation: 44649
This method is only available starting at yeoman-generator 0.18
. Update the version you're using.
Upvotes: 3