# luc-ui

> A React UI Library

Latest version **1.1.2** (published 2021-03-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install luc-ui
pnpm add luc-ui
yarn add luc-ui
bun add luc-ui
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-03-18 |
| First published | 2021-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 52.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | meet_the_best |

## Links

- npm: https://www.npmjs.com/package/luc-ui
- Repository: https://github.com/MeetTheBest/lc-ui
- Homepage: https://github.com/MeetTheBest/lc-ui#readme
- Issues: https://github.com/MeetTheBest/lc-ui/issues
- npm.io page: https://npm.io/package/luc-ui

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^17.0.1
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.1
- [react-use](https://npm.io/package/react-use.md) ^17.1.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [typescript](https://npm.io/package/typescript.md) ^4.1.5

## Recent versions

- 1.1.2 (latest) — 2021-03-18
- 1.1.1 — 2021-03-18
- 1.1.0 — 2021-03-18
- 1.0.12 — 2021-03-18
- 1.0.10 — 2021-03-17
- 1.0.7 — 2021-03-03

## README

# Lucky-ui

A React UI Library

## 目录结构

```js
├── CHANGELOG.md          // 变更日志
├── README.md
├── components            // 组件目录
│   ├── alert             // 组件
│   │   ├── alert.tsx
│   │   ├── demo          // 组件demo
│   │   ├── index.mdx     // docz展示文档
│   │   ├── index.ts      // 导出
│   │   ├── interface.ts  // 接口文件
│   │   └── style         // 组件样式目录
│   ├── index.ts          // 导出组件
│   └── style             // 通用样式目录
│       ├── components.less
│       ├── entry.less
│       ├── entry.ts      // umd打包入口(css)
│       ├── index.less
│       ├── index.ts
│       └── themes        // 主题目录
├── doc-comps             // docz展示通用组件
├── doczrc.js             // docz 配置文件
├── gulpfile.js           // gulp
templates                 // 组件快速创建模板
├──── component
│   ├── comp.hbs
│   ├── demo
│   ├── doc.hbs
│   ├── index.hbs
│   ├── interface.hbs
│   └── style
├── scripts               // 脚本目录
│   ├── build.umd.js      // umd打包脚本
│   └── release.ts        // npm包发布脚本
└── src                   // docz配置目录
    ├── gatsby-theme-docz
    │   ├── components
    │   └── theme
    └── quick-start.mdx   // 快速开始文档
```

## 开发 Lucky-ui

### 添加一个 UI 组件

```shell
$ npm run new
```

### 运行项目

```shell
$ npm run start
```

### 模块打包

#### UMD 模块

```shell
$ npm run build:umd
```

打包后存在在 `dist` 目录

#### 打包为 ES 模块和 CommonJS 模块

```shell
$ npm run build
```

- `ES` 模块存放在 `esm` 目录下
- `CommonJS` 模块存放在 `lib` 目录下

### 提交规范

```shell
$ npm run commit
```

- `faet`: 提交一个新特性
- `fix`: 修复一个 bug
- `docz`: 只更新文档
- `style`: 调整样式或非逻辑上的调整
- `refactor`: 重构
- `test`: 添加/修改测试用例
- `build`: 调整 script 脚本目录
- `ci`: 调整配置文件

### 版本发布

```shell
$ npm run release
```

## 如何 Lucky-ui 使用

### 浏览器引入

**示例**

```js
import { Alert } from 'lucky-ui';

ReactDOM.render(<Alert />, mountNode);
```

**引入样式**

```js
import 'lucky/dist/lucky.css';
```

### 安装

我们推荐使用 `npm` 或 `yarn` 的方式进行开发，不仅可在开发环境轻松调试，也可放心地在生产环境打包部署使用，享受整个生态圈和工具链带来的诸多好处。

```shell
$ npm install lucky-ui --save
```

```shell
$ yarn add lucky-ui
```

### 按需引入（推荐）

#### 手动引入样式

```js
import { Alert } from 'lucky-ui';
import 'lucky-ui/esm/alert/style';
```

#### 使用 [babel-plugin-import](https://www.npmjs.com/package/babel-plugin-import)

**安装**

```shell
$ npm i babel-plugin-import
```

**使用**

```js
{
  "plugins": [
    [
      "import",
      {
        libraryName: "lucky-ui",
        "style": true, // or 'css'
      }
    ]
  ]
}
```

## 国际化

## Listen

Lucky-ui is [MIT](LICENSE)

---
_Source: https://npm.io/package/luc-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
