我要开始创建我自己的尤曼发生器。
根据这个文章,我想把一些内容写到html文件中。我使用以下代码:
writing: function() {
this.fs.copyTpl(
this.templatePath("index.html"),
this.destinationPath("public/index.html"),
{ title: "My template" }
);
}但是当我运行我的发电机时,我有一个错误:TypeError: Object [object Object] has no method 'templatePath'
我的酵母版本为1.4.7,而酵母生成器版本为0.17.7。
发布于 2015-07-01 18:01:04
此方法仅从yeoman-generator 0.18开始可用。更新您正在使用的版本。
https://stackoverflow.com/questions/31124053
复制相似问题