通过 Five 的 React API 来创建 react 组件 你可以对组件功能进行抽象,作为公共组件发布
FiveProvider 中来控制对应的 five 实例mkdir a-five-react-component
npm init -y
npm install @realsee/five
npx five-react-component-init
.
├── README.md
├── devtools
│   ├── external-five.js
│   ├── external-react.js
│   ├── external-three.js
│   ├── tsconfig.build.json
│   ├── webpack.bundle.js
│   └── webpack.example.js
├── docs
├── examples
│   ├── data.json
│   ├── index.html
│   └── index.tsx
├── lib
│   └── index.tsx
├── package.json
└── tsconfig.json
example: 开发环境,编译 example 下的 index.ts, 监听变化,并且开启端口监听,可以通过 localhost:8080 访问build:doc: 通过 typedoc 生成项目文档,生成目标在 docs 目录下build:typescript: 通过 tsc 编译 ts 代码,生成目标在 build 目录下build:bundle: 通过 webpack 编译 unpack 包, 生成目标在 bundle 目录下build:all: npm run build:doc && npm run build:typescript && && npm run build:example && npm run build:bundle编译配置均在 devtools 目录下, 可以自行修改配置
devtools/tsconfig.build.json 下devtools/webpack.bundle.js 下build/index.js, 即通过 tsc 编译得到的代码。你可以在 package.json 中修改。build:bundle 生成的结果。todo