qyrc
v2.2.0
Published
react components
Downloads
35
Readme
预览: https://qianyin925.github.io/qyrc
特性
- 最新技术栈: 使用 [email protected] 新特性编写组件库
- 组件库编译: 使用 gulp + webpack 对组件库进行打包后发布
- UI 开发环境: 使用 Storybook 搭建 React UI 独立开发测试环境
- 按需加载: 允许通过 babel-plugin-import 实现组件的按需加载
- 基本配置: React 开发环境配置、eslint 配置、git commit 规范校验配置、版本发布配置......
参考轮子
使用
- 一次引入完整样式
import React from "react"
import { Scrollbar } from "qyrc"
import "qyrc/dist/qyrc.min.css"
- 按需加载: 手动加载样式模块
import React from "react"
import { Scrollbar } from "qyrc"
import "qyrc/lib/scrollbar/style"
- 按需加载: 通过 babel-plugin-import 实现
// babel babel-plugin-import 插件配置: 创建多个 babel-plugin-import 实例
module.exports = {
plugins: [
["babel-plugin-import", {
"libraryName": "qyrc",
"libraryDirectory": "es",
"style": true
},'cuke-ui'],
["babel-plugin-import", {
"libraryName": "antd",
"libraryDirectory": "es",
"style": true
},'antd'],
]
}
// 按需引入组件
import React from "react"
import { Scrollbar } from "qyrc"