0.0.1 • Published 5 years ago
reg-t v0.0.1
reg-t
文件生成器
使用
项目根目录下创建 reg-t.config.js 或 reg-t.config.json 配置文件
{
"template": {
"default": {
"path": "templates",
"output": "src/component"
}
}
}创建模板文件 templates/__name__.js
import React from 'react'
const __name__ = () => <h1>__name__ template</h1>使用cli
npx reg-t MyInput会在 src/component 下创建 MyInput/MyInput.js文件
import React from 'react'
const MyInput = () => <h1>MyInput template</h1>0.0.1
5 years ago