Giter VIP home page Giter VIP logo

guree's Introduction

Guree

CircleCI codecov npm version license

介绍

使用 React + TypeScript 编写的 UI 组件库

安装

yarn add guree

使用

import { Icon } from 'guree';
import 'guree/build/lib/index.css';

ReactDOM.render(<Icon></Icon>, mountNode);

按需加载

guree 的每个组件都被打包至单独的目录下,可以支持按需加载

import Icon from 'guree/build/lib/components/Icon'
import 'guree/build/lib/components/Icon/index.css'

也可以使用 babel-plugin-import 或者其他插件,使用 babel-plugin-import 的配置如下

{
  libraryName: 'guree',
  camel2DashComponentName: false,
  camel2UnderlineComponentName: false,
  libraryDirectory: "/build/lib/components",
  style: (name, file) => {
    return `${name}/index.css`;
  }
}

之后便可以按如下使用

import { Icon } from 'guree';

TypeScript

guree 完全使用 TypeScript 编写,并提供了完整的类型定义文件

测试

guree 对每个组件都进行单元测试,测试覆盖率 100%

文档地址

https://lychz.github.io/guree/styleguide/

guree's People

Contributors

lychz avatar

Watchers

James Cloos 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.