@adessa/beans 中文文档教程
Beans - 用于构建 React 组件库的样板。
Get Started
要启动您自己的 React 组件库,请克隆此存储库,一切就绪。
$ git clone https://github.com/reactivenode/beans your-library-name
$ cd your-library-name
$ rm -rf .git
$ git init
Development and Storybook
您可以使用 Storybook 轻松开发组件并与之交互。 要运行本地服务器,只需运行:
$ npm i
$ npm run storybook
导航到 http://localhost:9001 以查看您的故事。 它们应该在您开发时自动更新。
Storybook 将从组件文件夹中的 stories.js
文件中选取任何故事。
我们正在使用可用的最新技术,因此您可能需要将 Node 版本更新到最新版本以适应 Babel 7 和 Webpack 4。
Beans - A boilerplate to build a React component library.
Get Started
To start your own React component library, clone this repository and you are all set to go.
$ git clone https://github.com/reactivenode/beans your-library-name
$ cd your-library-name
$ rm -rf .git
$ git init
Development and Storybook
You can easily develop and interact with your components by using Storybook. To run the local server, simply run:
$ npm i
$ npm run storybook
Navigate to http://localhost:9001 to view your stories. They should automatically update as you develop.
Storybook will pick up any story from the stories.js
file in a component folder.
We are using the latest technology available, so you may need to update your Node versions to latest to accomodate Babel 7 and Webpack 4.