Browse Source

docs(readme): contribute

1. update readme 2.update FAQ 3.add english contribute docs
master
mengshukeji 5 years ago
parent
commit
9e94b06f39
  1. 21
      README-zh.md
  2. 19
      README.md
  3. 3
      docs/.vuepress/config.js
  4. 12
      docs/guide/FAQ.md
  5. 222
      docs/guide/contribute.md
  6. 12
      docs/zh/guide/FAQ.md
  7. 15
      docs/zh/guide/contribute.md

21
README-zh.md

@ -39,9 +39,22 @@
更详细的功能列表,请查阅:[特性](https://mengshukeji.github.io/LuckysheetDocs/zh/guide/#%E7%89%B9%E6%80%A7)
## 开发计划
## 📜 更新日志
每个版本的详细更改都记录在 [CHANGELOG.md](CHANGELOG.md) 中。
## ❗️ 问题反馈
在反馈问题之前,请确保仔细阅读 [如何提交问题](https://mengshukeji.github.io/LuckysheetDocs/zh/guide/contribute.html#如何提交问题)。 不符合准则的问题可能会立即被移除。
## ✅ 开发计划
通过 [GitHub Projects](https://github.com/mengshukeji/Luckysheet/projects/1) 管理
## 💪 贡献
在提交PR之前,请确保仔细阅读 [贡献指南](https://mengshukeji.github.io/LuckysheetDocs/zh/guide/contribute.html)。
## 用法
### 第一步
@ -98,12 +111,6 @@ nnpm run build
- [excelize](https://github.com/360EntSecGroup-Skylar/excelize)
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
## 贡献
1. 任何疑问或者建议,欢迎提交[Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
2. 详细了解:[如何参与贡献](https://github.com/mengshukeji/Luckysheet/issues/128)
## 交流
- 添加小编微信,拉你进Luckysheet开发者交流微信群,备注:加群

19
README.md

@ -44,10 +44,22 @@ English| [简体中文](./README-zh.md)
For a more detailed feature list, please refer to: [Features](https://mengshukeji.github.io/LuckysheetDocs/guide/#features)
## ✅TODO
## 📜 Changelog
Detailed changes for each release are documented in the [CHANGELOG.md](CHANGELOG.md).
## ❗️ Issues
Please make sure to read the [Issue Reporting Checklist](https://mengshukeji.github.io/LuckysheetDocs/guide/contribute.html#how-to-submit-issues) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
## ✅ TODO
Managed with [GitHub Projects](https://github.com/mengshukeji/Luckysheet/projects/1)
## 💪Contribution
Please make sure to read the[ Contributing Guide](https://mengshukeji.github.io/LuckysheetDocs/guide/contribute.html) before making a pull request.
## Usage
### First step
@ -104,11 +116,6 @@ nnpm run build
- [excelize](https://github.com/360EntSecGroup-Skylar/excelize)
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
## Contribution
1. Any questions or suggestions are welcome to submit [Issues](https://github.com/mengshukeji/Luckysheet/issues/new/choose)
2. Learn more:[How to contribute](https://github.com/mengshukeji/Luckysheet/issues/128)
## Communication
- [Gitter](https://gitter.im/mengshukeji/Luckysheet)

3
docs/.vuepress/config.js

@ -62,7 +62,8 @@ module.exports = {
'operate',
'api',
'resource',
'FAQ'
'FAQ',
'contribute'
],
'/about/': [
'',

12
docs/guide/FAQ.md

@ -235,3 +235,15 @@ The second step, if it is to import the packaged code of the github repository,
Tip: Most other npm installation problems can also be solved by trying above steps.
------------
## **<span style="font-size:20px;">Q</span>**How to carry out secondary development of Luckysheet in Vue project?
**<span style="font-size:20px;">A</span>** The [luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue) case is to provide an application integration solution.
If directly developed locally:
1. Start both the Luckysheet project and your own Vue project. For example, the Luckysheet project is at http://localhost:3001
2. Import Luckysheet to use in the Vue project through `http://localhost:3001`
In this case, after Luckysheet is modified in real time, the changes can be seen in the Vue project
------------

222
docs/guide/contribute.md

@ -0,0 +1,222 @@
# Contribution guide
welcome! We are very happy that you are here and look forward to your interest in participating in Luckysheet contributions. Of course, before you participate in the Luckysheet contribution, please make sure to read the following full text:
## Our code of conduct
1. We promise to respect all those who participated in the contribution, not limited to those who raised questions, contributed documents and code, resolved bugs and other contributions;
2. We are obliged to abide by local laws and regulations, and we reject all behaviors with legal risks;
3. We oppose any participant's derogatory comments, personal attacks, harassment or insult to others, and other non-professional behaviors;
4. We have the right and responsibility to delete or edit content that does not comply with this code of conduct, not limited to code, issues, wikis, documents and others. Participants who do not comply with the code of conduct may be removed from the team;
5. We accept the supervision of anyone, and anyone can report to us the facts that are found to be inconsistent with this code of conduct through problem feedback.
## How to participate in contributing?
* Contributed documents: Browsing the document can deepen your understanding of Luckysheet. Once you find that the document is not clearly written or the logic is confusing, you can correct, modify, and supplement. You can go to [Google Forum](https://groups.google.com/g/luckysheet) to give feedback
* Contributing code: Welcome everyone to contribute code to the Luckysheet community, you are welcome to claim the Open state [Issues](https://github.com/mengshukeji/Luckysheet/issues) and unfinished features, submit a PR, and become one of the contributors If you find that some functions cannot meet your needs or have problems during use, please record in Issues
* Participate in the issue discussion: you can post your suggestions under any [Issues](https://github.com/mengshukeji/Luckysheet/issues)
* Review code: You can see PR submitted by all contributors on [Github](https://github.com/mengshukeji/Luckysheet), you can review their code and post your suggestions
## How to submit issues
Before you submit features/improvements, you should pay attention to the following points:
* Please confirm whether the feature/improvement has been submitted by others
* An easy-to-understand title to explain the bug/submission feature/improvement you submitted
* If it is a bug, describe the cause of the bug in detail. If it can be reproduced, please try to provide complete reproduction steps
* If it is a feature, then the feature should have wide applicability, suitable for most users, and it is best to provide detailed design documents
* If it is an improvement, describe the benefits of this improvement as clearly as possible
Specific steps:
* Create [Issues](https://github.com/mengshukeji/Luckysheet/issues) and describe the issue clearly
* If you want to solve the issue, assign the issue to your own name. If you just submit a bug/feature/improvement and don’t have time to contribute code, set assignne to empty
* If it is a relatively large feature/improvement, try to output the design document first and follow the [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) process for others to review
* After coding, submit the code
## How to claim Issues
In Luckysheet's [Issues](https://github.com/mengshukeji/Luckysheet/issues) list, there are many issues created by others that have not been repaired. If you are interested, you can claim these issues. The steps to claim are as follows:
* Leave a message under the issue, express the idea of claiming the task, and specify **@I can solve it**
* If the submitter has no comments, assign the issue to your own name and update the progress in time
* If it is a relatively large feature, try to output the design document first and follow the [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) process for others to review
* Develop the code and submit the code to github
## How to submit code
1. Fork to own warehouse
Go to the Github page of [Luckysheet](https://github.com/mengshukeji/Luckysheet), and click the Fork button in the upper right corner to proceed.
2. Git clone to local
```shell
git clone https://github.com/<your_github_name>/Luckysheet.git
```
3. Establish a connection upstream
```shell
cd Luckysheet
gitremote add upstream https://github.com/mengshukeji/Luckysheet.git
```
4. Create a development branch
```shell
git checkout -b dev
```
5. Modify the submission code
```shell
git add.
npm run commit
git push origin dev
```
6. Sync code, synchronize the latest code to the local
```shell
git fetch upstream
git rebase upstream/master
```
7. If there is a conflict (nothing can be ignored)
```shell
git status # View conflict files and modify conflicts
git add.
git rebase --continue
```
When submitting the git rebase --continue command, if vim prompts to edit the commit information, you can add your changes, then save and exit
> For vim commands, please refer to the [vim](https://www.runoob.com/linux/linux-vim.html)
8. Submit branch code
```shell
git push origin dev
```
If you are prompted to pull first, you can pull it before submitting
```shell
git pull origin dev
git push origin dev
```
If the vim prompt to edit the commit information pops up, you can exit directly through the vim command
> For vim commands, please refer to [vim](https://www.runoob.com/linux/linux-vim.html)
9. Submit pr
Go to the fork project in your github warehouse, switch to the branch you just created and modified, click new pull request, and add the corresponding description, and finally click Create pull request to submit
## Code Specification
> General code specification example
* Keep the block depth to a minimum. Avoid nested If conditions as much as possible
```js
// CORRECT
if (!comparison) return
if (variable) {
for (const item of items) {}
} else if (variable2) {
// Do something here
}
// INCORRECT
if (comparison) {
if (variable) {
for (const item in items) {}
} else if (variable2) {
// Do something here
}
} else {
return
}
```
* Do not use operands for chain comparison
```js
// CORRECT
if (cb) cb()
if (!cb || (cb === fn)) cb()
// INCORRECT
cb && cb()
(!cb || (cb === fn)) && cb()
```
* All variables should be declared at the beginning of the block in alphabetical order
```js
// CORRECT
function foo () {
const foo ='bar'
const bar ='foo'
if (conditional) {}
...
return foo
}
// INCORRECT
function foo () {
const foo ='bar'
if (conditional) {}
const bar ='foo'
...
return foo
}
```
* Return as soon as possible
```js
// CORRECT
if (condition) return'foo'
if (condition2) return'bar'
// Return must have a blank line above
return'fizz'
// INCORRECT
const variable =''
if (condition) {
variable ='foo'
} else if (condition2) {
variable ='bar'
} else {
variable ='fizz'
}
return variable
```
## How to contribute documents
## How to become Luckysheet Committer
As long as anyone contributes to the Luckysheet project, you are the officially recognized Contributor of the Luckysheet project. There is no exact standard for growing from Contributor to Committer, and there is no expected timetable, but Committer candidates are generally A long-term active contributor, becoming Committer does not require a huge architectural improvement contribution, or how many lines of code contributions, contributing code, contributing documents, participating in mailing list discussions, helping to answer questions, etc., are all ways to increase their influence .
List of potential contributions (in no particular order):
* Submit the bugs, features, and improvements you found to the issue
* Update the official documents so that the project documents are the most recent, the best practices for writing Luckysheet, and various useful documents for the users
* Perform test and report test results, performance test and other MQ performance comparison test, etc.
* Review the work of others (including code and non-code) and publish your own suggestions
* Guide new contributors and be familiar with the community process
* Post a blog about Luckysheet
* Any contribution to the development of the Luckysheet community
* ......

12
docs/zh/guide/FAQ.md

@ -236,3 +236,15 @@ Luckysheet教程里采用的CDN链接是 [jsdelivr](https://www.jsdelivr.com/pac
提示:大多数的其他npm安装问题,也可以尝试此步骤来解决。
------------
## **<span style="font-size:20px;">Q</span>**怎样在vue工程里对Luckysheet进行二次开发`?
**<span style="font-size:20px;">A</span>** [luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue) 案例是提供一个应用集成的方案。
如果本地直接开发的话:
1. 把Luckysheet的工程和自己的Vue工程都启动起来,比如Luckysheet的工程在 `http://localhost:3001`
2. 在Vue工程里面通过 `http://localhost:3001` 引入Luckysheet使用
这样的话,Luckysheet实时修改后,Vue工程里是可以看到更改的
------------

15
docs/zh/guide/contribute.md

@ -49,31 +49,30 @@
## 如何提交代码
1. fork 到自己的仓库
1. fork 到自己的仓库
进入  [Luckysheet](https://github.com/mengshukeji/Luckysheet)  的Github页面 ,点击右上角按钮 Fork 进行 Fork。
2. git clone 到本地
2. git clone 到本地
```shell
git clone https://github.com/<your_github_name>/Luckysheet.git
```
3. 上游建立连接
3. 上游建立连接
```shell
cd Luckysheet
git remote add upstream https://github.com/mengshukeji/Luckysheet.git
```
4. 创建开发分支
```shell
git checkout -b dev
```
5. 修改提交代码
5. 修改提交代码
```shell
git add . 
@ -81,7 +80,7 @@ npm run commit
git push origin dev
```
6. 同步代码,将最新代码同步到本地
6. 同步代码,将最新代码同步到本地
```shell
git fetch upstream 
@ -96,7 +95,7 @@ git add .
git rebase --continue
```
提交git rebase --continue命令的时候,如果弹出vim提示编辑commit信息,则可以添加你的修改,然后保存退出
vim命令请参考vim链接https://www.runoob.com/linux/linux-vim.html
> vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html)
8. 提交分支代码
@ -112,7 +111,7 @@ git push origin dev
若弹出vim提示编辑commit信息,可以直接通过vim命令退出
> vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html)
9. 提交pr
9. 提交pr
去自己github仓库对应fork的项目,切换到刚刚创建修改的分支,点击new pull request,并添加上对应的描述,最后点击Create pull request进行提交
## 代码规范

Loading…
Cancel
Save