Giter Club home page Giter Club logo

sailboat's Introduction

sailboat

it's just a simple component library

dependencies version

  • [node] 16+

考虑的问题

  • 代码结构
  • 格式化 - 代码校验
  • 样式解决方案
  • 组件需求分析和编码
  • 组件测试用例分析和编码
  • 代码打包输出和发布
  • CI/CD 文档生成...

项目结构

sailboat
  README.md
  node_modules/
  package.json
  tsconfig.json
  src/
      components/
        Button/
          button.tsx
          button.test.tsx
          style.scss
      styles/
        ...
      index.tsx

格式化, 校验eslint + prettierrc

  • eslint , prettierrc

样式解决方案

全局变量, 依赖, 可重用性,

  • Inline css

  • CSS in JS

  • Sass/Less (选择用)

style/
  _variables.scss (各种变量以及可配置设置)
  _reboot.scss (样式初始化 normalize.css)
  _mixins.scss (全局mixins)
  _function.scss (全局 functions)
  index.scss (入口)
components/
  Button/
    style.scss(组件单独样式)

色彩体系

  • 系统色板 - 基础色板 + 中性色板
  • 产品色板 - 品牌色 + 功能色板

样式变量分类

  • 基础色彩系统
  • 字体系统
  • 表单
  • 按钮
  • 边框和阴影
  • 可配置开关

normalize.css

other

  • 单个组件测试: npm test -- -t "regular"

CI/CD

sailboat's People

Contributors

lzw10168 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.