1.0.0 • Published 2 years ago
yo-copy v1.0.0
yo-copy
完整复制Yeoman生成器中模板目录并应用引擎渲染
Usage
const {yoCopy} = require('yo-copy');
module.exports = class extends Generator {
initializing() {
// 模板文件获取数据通过ejs语法,如<%= name %>
this.props = {name: 'name'};
}
writing() {
// this.props中数据会被传入每一个模板文件中
yoCopy(this);
}
}
1.0.0
2 years ago