@luozhu/template-generator
v0.4.3
Published
A template generator based on handlebars.
Downloads
6
Maintainers
Readme
@luozhu/template-generator
A template generator based on handlebars.
Install
$ npm install @luozhu/template-generator
OR
$ yarn add @luozhu/template-generator
Usage
const generator = require('@luozhu/template-generator');
// 编译当前目录下所有符合 `**/*.tpl.*` 模式的文件
generator(
{
name: '洛竹',
},
process.cwd()
);
// 编译当前目录下所有文件
generator(
{
name: '洛竹',
},
process.cwd()
{
tplSuffix: false
}
);
// 编译当前目录下所有文件(但是排除 .js 结尾的文件)
generator(
{
name: '洛竹',
},
process.cwd()
{
tplSuffix: false,
exclude: ['**/*.js'],
}
);
具体案例请查看 @luozhu/create-vscode-extension