项目根目录下新建feHelper_config.json配置文件
配置如下:
{
// 本地项目地址,绝对路径
"projects": [
{
"name": "项目1",
"code": "project1",
"projectPath": "/xxx/project1"
},
{
"name": "项目2",
"code": "project2",
"projectPath": "/xxx/project2"
}
],
// 配置store仓库地址,绝对路径
"storePath": "/xx/fe-helper-store-react"
}安装依赖:yarn
启 动:yarn start
比如一个 button 组件,需要配置如下。
➜ button tree
.
├── index.js
└── info
├── info.json
└── view.png
1 directory, 3 filesimport React from "react";
export default class Button extends React.Component {
render() {
return <div>I'm a button</div>;
}
}{
"type": "按钮类型",
"cName": "普通按钮",
"name": "button",
"author": "test"
}button 预览图片文件
