Skip to content

Commit

Permalink
Merge pull request #2191 from XiaoMi/develop
Browse files Browse the repository at this point in the history
Publish HiUI V4.
  • Loading branch information
solarjoker authored Jul 25, 2022
2 parents 5b5993f + 14e77f5 commit 7f30bad
Show file tree
Hide file tree
Showing 173 changed files with 2,106 additions and 1,615 deletions.
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: 提交错误报告来帮助我们改进
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Bug 描述**
清晰简洁的描述 bug 内容。

**参考**
重现步骤:

1. 使用 xx 组件
2. 点击 '....'
3. 触发 '....'
Expand All @@ -23,11 +23,11 @@ assignees: ''
**截屏**
如果方便的话可以提供一个截屏描述你的问题。


**可重现环境:**
- 系统: [比如 macOS]
- 浏览器: [比如 chrome, safari]
- HIUI 的版本: [比如 1.3.6]

- 系统: [比如 macOS]
- 浏览器: [比如 chrome, safari]
- HiUI 的版本: [比如 1.3.6]

**附加内容**
关于此问题的其它信息。
2 changes: 1 addition & 1 deletion .hygen/create/hook/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to: <%= h.hooksDir(`${name}/package.json`) %>
"version": "4.0.0-beta.0",
"description": "A sub-package for @hi-ui/hooks.",
"keywords": [],
"author": "HIUI <mi-hiui@xiaomi.com>",
"author": "HiUI <mi-hiui@xiaomi.com>",
"homepage": "https://github.com/XiaoMi/hiui/tree/master/packages/hooks/<%= name %>#readme",
"license": "MIT",
"directories": {
Expand Down
21 changes: 12 additions & 9 deletions .hygen/create/ui-pro/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ to: <%= h.uiDir(`${name}/package.json`) %>
---
{
"name": "@hi-ui/<%= name %>",
"version": "4.0.0-beta.0",
"version": "4.0.0-alpha.0",
"description": "A sub-package for @hi-ui/hiui.",
"keywords": [],
"author": "HIUI <mi-hiui@xiaomi.com>",
"author": "HiUI <mi-hiui@xiaomi.com>",
"homepage": "https://github.com/XiaoMi/hiui/tree/master/packages/ui/<%= name %>#readme",
"license": "MIT",
"directories": {
Expand Down Expand Up @@ -46,16 +46,19 @@ to: <%= h.uiDir(`${name}/package.json`) %>
"url": "https://github.com/XiaoMi/hiui/issues"
},
"dependencies": {
"@hi-ui/classname": "^4.0.0-beta.0",
"@hi-ui/core": "^4.0.0-beta.0",
"@hi-ui/core-css": "^4.0.0-beta.0",
"@hi-ui/env": "^4.0.0-beta.0"
"@hi-ui/classname": "^4.0.0",
"@hi-ui/env": "^4.0.0"
},
"peerDependencies": {
"react": ">=16.8.6"
"@hi-ui/core": ">=4.0.0",
"react": ">=16.8.6",
"react-dom": ">=16.8.6"
},
"devDependencies": {
"@hi-ui/hi-build": "^4.0.0-beta.1",
"react": "^17.0.1"
"@hi-ui/core": "^4.0.0",
"@hi-ui/core-css": "^4.0.0",
"@hi-ui/hi-build": "^4.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
15 changes: 8 additions & 7 deletions .hygen/create/ui/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ to: <%= h.uiDir(`${name}/package.json`) %>
---
{
"name": "@hi-ui/<%= name %>",
"version": "4.0.0-beta.0",
"version": "4.0.0-alpha.0",
"description": "A sub-package for @hi-ui/hiui.",
"keywords": [],
"author": "HIUI <mi-hiui@xiaomi.com>",
"author": "HiUI <mi-hiui@xiaomi.com>",
"homepage": "https://github.com/XiaoMi/hiui/tree/master/packages/ui/<%= name %>#readme",
"license": "MIT",
"directories": {
Expand Down Expand Up @@ -46,17 +46,18 @@ to: <%= h.uiDir(`${name}/package.json`) %>
"url": "https://github.com/XiaoMi/hiui/issues"
},
"dependencies": {
"@hi-ui/classname": "^4.0.0-beta.0",
"@hi-ui/core": "^4.0.0-beta.0",
"@hi-ui/core-css": "^4.0.0-beta.0",
"@hi-ui/env": "^4.0.0-beta.0"
"@hi-ui/classname": "^4.0.0",
"@hi-ui/env": "^4.0.0"
},
"peerDependencies": {
"@hi-ui/core": ">=4.0.0",
"react": ">=16.8.6",
"react-dom": ">=16.8.6"
},
"devDependencies": {
"@hi-ui/hi-build": "^4.0.0-beta.1",
"@hi-ui/core": "^4.0.0",
"@hi-ui/core-css": "^4.0.0",
"@hi-ui/hi-build": "^4.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
Expand Down
2 changes: 1 addition & 1 deletion .hygen/create/util/package.json.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to: <%= h.utilsDir(`${name}/package.json`) %>
"version": "4.0.0-beta.0",
"description": "A sub-package for @hi-ui/utils.",
"keywords": [],
"author": "HIUI <mi-hiui@xiaomi.com>",
"author": "HiUI <mi-hiui@xiaomi.com>",
"homepage": "https://github.com/XiaoMi/hiui/tree/master/packages/utils/<%= name %>#readme",
"license": "MIT",
"directories": {
Expand Down
5 changes: 1 addition & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { withPerformance } from "storybook-addon-performance";
// import { Meta, ArgsTable, Source, Story, Canvas } from '@storybook/addon-docs/blocks'
// import { Title, Subtitle, Description, Primary, ArgsTable, Stories, PRIMARY_STORY } from '@storybook/addon-docs/blocks'
// import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live'
import LocaleProvider from '@hi-ui/locale-context'
import HiUIProvider from '@hi-ui/provider'

// import Popper from '../packages/ui/popper/src/index.js'
Expand Down Expand Up @@ -56,9 +55,7 @@ export const decorators = [

return (
<HiUIProvider accentColor={accentColor} locale={locale} theme={theme}>
{/* <LocaleProvider locale={locale}> */}
<Story {...context} />
{/* </LocaleProvider> */}
<Story {...context} />
</HiUIProvider>
);
},
Expand Down
145 changes: 145 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# 贡献指南

很高兴您有兴趣为 HiUI 做出贡献。

在提交您的贡献之前,请务必花点时间阅读以下指南:

## 分支管理

### 稳定分支

> 正式版本分支。其中 master 为最新稳定发布版本,stable/xx 为最新历史大版本稳定分支。
- master
- stable/3.x
- stable/2.x
- stable/1.x

### 特性分支

> 特性版本分支,用于当前最新版本特性的开发管理,bugfix 和 feature 都会率先合并到此分支,同时会定期 PR 到 master 完成正式版本的发布。
- develop

## Bug & feature

> 我们使用 [Github issues](https://github.com/XiaoMi/hiui/issues) 来追踪 bug 和 feature。
为了更快地反馈和解决问题,我们推荐您通过组件页面的 **Feedback 按钮**一键直达对应组件的 Issue 反馈入口;

同时也可以直接在 HiUI github 首页通过我们提供的 Issue 模板来编写。

## Pull Request

> HiUI 团队会认真对待每一个 PR,我们会 CR 您的代码,然后再决定合并。期间也有可能会同您进行一些代码上的探讨和优化。
要提交一个 PR,请遵循以下步骤:

1. Fork 并克隆 HiUI 仓库

```bash
git clone https://github.com/<github-username>/hiui.git
cd hiui
```

2. 新建开发分支

```bash
git checkout -b <BRANCH_NAME>
```

> 分支名建议是 hotfix/#<IssueId> 或者 feature/#<IssueId>
## 开发流程

> 安装环境前确保本地有 `yarn` 依赖的 NodeJS 环境,并且 Node 版本建议是 14.x。
- 安装依赖

```sh
yarn
```

- lerna 启动

```sh
yarn bootstrap
```

- 预编译

```sh
yarn build
```

- 开始开发

```sh
yarn storybook
```

## 辅助工具

### 模板创建

- 创建组件

> 注意采用小写中划线命名规范
```sh
yarn create:pkg ui `component-name`
```

2. 创建通用工具函数

> 注意采用小写中划线命名规范
```sh
yarn create:pkg util `util-name`
```

3. 创建自定义 hooks

> 注意采用小写中划线命名规范
```sh
yarn create:pkg hook `hook-name`
```

## 通用方法

### hooks

> packages/hooks
### utils

> packages/utils
### 包管理

- 给指定包添加依赖包

```sh
yarn lerna add @hi-ui/button --scope=@hi-ui/date-picker
```

- 对指定包执行 npm scripts 相关命令

```sh
yarn lerna run build --scope=@hi-ui/date-picker

yarn lerna run test --scope=@hi-ui/date-picker
```

- 发布

```sh
yarn run publish:pkg
```

### 文档生成

```sh
yarn lerna run test --scope=@hi-ui/hi-docs
```
85 changes: 0 additions & 85 deletions README-en.md

This file was deleted.

Loading

0 comments on commit 7f30bad

Please sign in to comment.