0.3.4 • Published 4 years ago

use-template v0.3.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

template

配置模版渲染器

Installation

npm install use-template

使用

const templateRender = require('use-template');
templateRender({
  template: 'ascp-query-list',
  variable: {
    group: 'ascp-comp',
    project: 'test-template',
    version: '5.0.0',
    author: 'kaihao.zkh',
    description: '',
  },
});

模版目录结构

会默认读取 template 文件夹里面的内容复制到当前目录

├── README.md
├── tpl.config.js
├── tplrc.js
└── template
  ├── __gitignore
  ├── ...

API

参数说明类型默认值
template模版名称String
downloadType下载方式(clone 或者 http)Stringhttp
variable模版内容变量Object{}
dest模版初始到对应的目的目录String当前文件夹
contentDir本地 copyString
templateConf模版初始化生命周期Object{}
0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago