Code Monkey home page Code Monkey logo

react-ui-library-tutorial's Introduction

React 组件库搭建指南

组件库一直是前端开发不可或缺的一环,主要是为了开发提效,避免开发同学复制粘贴和重复造轮子。

对于 2C 移动端场景而言,不同业务线的设计规范大相径庭,过于定制化,所以内部其实一直没有一套基于 React 的移动端组件库。

而对于某一条特定的业务线来讲,设计语言是能够也必须要达到统一的。

于是在部门内搭了一个简单的组件库,组件不多,但在搭建过程中掌握了很多知识,再看 antd 等热门组件库,对其中的一些设计也有了更深的感悟,故记录下来,希望能帮助到其他的同学。

🚀 在线预览

🚆 本地预览

git clone [email protected]:worldzhao/react-ui-library-tutorial.git
cd react-ui-library-tutorial
yarn
yarn start

按顺序执行完命令后,即可在 localhost:3000 端口看到以下内容:

preview

概览

本系列文章主要包含以下内容:

  • 项目初始化: 组件库前期开发准备工作。eslint/commit lint/typescript等等;
  • 开发阶段: 使用docz进行开发调试以及文档编写;
  • 打包阶段: 输出~~umd~~/cjs/esm产物并支持按需加载;
  • 组件测试: 使用@testing-library/react及其相关生态进行组件测试;
  • 发布 npm: 编写脚本完成自动化发布;
  • 部署文档站点: 使用now部署文档站点。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.