From 34fde16bfa1ee063489b21a9145e8429b6d117bc Mon Sep 17 00:00:00 2001 From: xiazeyu_2011 Date: Sat, 26 May 2018 10:52:03 +0800 Subject: [PATCH] docs: update template --- .github/CODE_OF_CONDUCT.md | 46 ++++++++++--- .github/CONTRIBUTING.md | 56 ++++++++-------- .github/ISSUE_TEMPLATE.md | 19 +++--- .github/ISSUE_TEMPLATE/-----.md | 17 ----- .github/ISSUE_TEMPLATE/----.md | 49 -------------- .github/ISSUE_TEMPLATE/bug-report-----.md | 64 +++++++------------ .github/ISSUE_TEMPLATE/bug_report.md | 8 +-- .../ISSUE_TEMPLATE/feature-request------.md | 12 +--- .github/PULL_REQUEST_TEMPLATE.md | 24 +++---- 9 files changed, 112 insertions(+), 183 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/-----.md delete mode 100644 .github/ISSUE_TEMPLATE/----.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 2ccd8cf..8a1ca4f 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,7 +2,12 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project +and our community a harassment-free experience for everyone, regardless of +age, body size, disability, ethnicity, gender identity and expression, level +of experience, nationality, personal appearance, race, religion, or sexual +identity and orientation. ## Our Standards @@ -19,31 +24,52 @@ Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in + a professional setting ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. ## Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an +appointed representative at an online or offline event. Representation of a +project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at cneyhn@gmail.com or xiazeyu_2011@126.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at cneyhn@gmail.com or +xiazeyu_2011@126.com. The project team will review and investigate all +complaints, and will respond in a way that it deems appropriate to the +circumstances. The project team is obligated to maintain confidentiality +with regard to the reporter of an incident. Further details of specific +enforcement policies may be posted separately. -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. +Project maintainers who do not follow or enforce the Code of Conduct in +good faith may face temporary or permanent repercussions as determined +by other members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version] The second dimension is the best! - [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0237d37..081f116 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,25 +1,27 @@ # Contributing - ## Issues -- Most of the time, if this plugin is not working correctly for you it is a simple **configuration** issue. - -- **Search on the internet** and **among closed issues** in advance would do a great help for us. +- Most of the time, if this plugin is not working correctly for you it is + a simple **configuration** issue. -- Please **keep focus on the topic** of any issue, and use **English** as far as possible so that everyone will understand you. +- **Search on the internet** and **among closed issues** in advance would + do a great help for us. -- **If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.** +- Please **keep focus on the topic** of any issue~~, and use **English** as + far as possible so that everyone will understand you.~~ +- **If you have discovered a bug or have a feature suggestion, feel free to + create an issue or pull request on Github.** ## Contributing directly to the source code -**Working on your first Pull Request?** You can learn how from this *free* series -[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) +**Working on your first Pull Request?** You can learn how from this *free* +series +[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) See workflow for more code developing information. - ## Submitting Changes After getting some feedback, push to your fork and submit a pull request. We @@ -29,32 +31,33 @@ your pull request should be accepted quickly. Some things that will increase the chance that your pull request is accepted: - Follow the existing coding style +- run `npm run lint` before you commit it.(or use `npm run lint -- fix` to try to fix automaticly) - Write a good commit message use `npm run commit` - Make sure that your code can work properly. - ## Documentation -live2d-widget.js's feature is now becoming richer and richer, and documentation is a huge time sink. -We greatly appreciate any time spent fixing typos or clarifying sections in the -documentation. +live2d-widget.js's feature is now becoming richer and richer, and +documentation is a huge time sink.We greatly appreciate any time +spent fixing typos or clarifying sections in the documentation. From opening a bug report to creating a pull request: every contribution is appreciated and welcome. If you're planning to implement a new feature or change the api please create an issue first. This way we can ensure that your precious work is not in vain. - - ## Workflow: modify the code -- We use **[EditorConfig](http://editorconfig.org/)** to define and maintain consistent coding styles, so have a look first. +- We use **[EditorConfig](http://editorconfig.org/)** to define and maintain + consistent coding styles, so have a look first. - Please use the latest version of Node.js to work with. +### 0. Fork at first + ### 1. Install environments -- Use `npm run inst:dev` to install all the environments. +- Use `npm run inst:dev` to **install all the environments**. ### 2. Make changes @@ -62,26 +65,25 @@ work is not in vain. - Use `npm run build:dev` to build client js files **with debug files and watchdog.**. -### 3. Debug until you make sure that your code works properly. +### 3. Debug until you make sure that your code works properly ### 4. Commit those changes -- **Use `npm run build:prod` to build final client js.** -**Important!!! The step must be done before commit!!!** +- Use `npm run lint` to check your code first, or use `npm run lint -- fix` to try to fix automaticly. + +- Use `npm run build` to build final client js. -- Use `git add .`, or choose the file you want to commit. +- Use `git add --all`, or choose the file you want to commit. -- Use `npm run commit` to commit, **Never use `git commit`!!!** +- We recommend `npm run commit` to commit, **please follow the Angular style** ### 5. Push the changes - Use `git push` to push the changes to the github server. - ## Workflow(author): Release a new version -*Let the Collaborator or author do it.* - +### Let the Collaborator or author do it ### 1. Bump the version @@ -97,12 +99,12 @@ work is not in vain. ### 3. Commit package.json and package-lock.json -- Use `npm run commit` to commit, **Never use `git commit`!!!** +- Use `npm run commit` to commit ### 4. Tag and release a new version - In the Github page. -### 5. Publish the package to npm. +### 5. Publish the package to npm - Use `npm publish` to publish it. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index bc441ec..0ef993d 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,15 +1,12 @@ -### Expected behavior 预期行为 +# Issue -### Actual behavior 实际行为 +- [ ] I have alreday read instructions in [CONTRIBUTING](CONTRIBUTING.md). + 我已仔细阅读[CONTRIBUTING](CONTRIBUTING.md)中的相关内容。 -### Steps to reproduce the behavior 复现步骤 +- [ ] I have alreday read instructions in [README](../README.md). + 我已仔细阅读[README](../README.md)中的相关内容。 +> Change the `[ ]` into `[x]` to show my acceptance. +将 `[ ]` 变为 `[x]` 来表示我接受了这些问题。 -- [ ] I have alreday read instructions in [CONTRIBUTING](./CONTRIBUTING.md). -我已仔细阅读[CONTRIBUTING](./CONTRIBUTING.md)中的相关内容。 - -> Change the `[ ]` into `[x]` to show your acceptance. -将 `[ ]` 变为 `[x]` 来表示你接受了这些问题。 - - -@EYHN @xiazeyu +@xiazeyu @EYHN diff --git a/.github/ISSUE_TEMPLATE/-----.md b/.github/ISSUE_TEMPLATE/-----.md deleted file mode 100644 index 2ee989f..0000000 --- a/.github/ISSUE_TEMPLATE/-----.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: 请求新功能 -about: 为我提一个新想法 - ---- - -**你的新功能与某一个问题有关吗?** -请简明清晰地描述你的问题, 例如: 我常常因为 [...] 而失望 - -**你的方案是** -请简明清晰地描述你的方案 - -**一些你考虑过的替代方案有** -请简明清晰地描述你的考虑过的替代方案或功能 - -**额外的信息** -请在此处描述其他的内容或者一些有关此功能的截图 diff --git a/.github/ISSUE_TEMPLATE/----.md b/.github/ISSUE_TEMPLATE/----.md deleted file mode 100644 index 1b7382d..0000000 --- a/.github/ISSUE_TEMPLATE/----.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: 错误报告 -about: 创造一个报告以便更好地迭代 - ---- - -**描述你的问题** -请简明清晰地描述您所遇到的问题 - -**复现步骤** -复现此问题的步骤 - -出现问题的网站地址: -加载命令: -```js - -L2Dwidget.init(); - -``` -控制台输出: - -1. 打开'...' -2. 双击'...' -3. 滑动到'...' -4. 发现'...'错误 - -**预期的行为** -请简明清晰地描述此操作预期的结果 - -**屏幕截图** -如果可能, 请添加一些屏幕截图来更好地描述你的问题 - -**环境信息(请务必填写下列信息)** -- 设备: [e.g. iPhone 6, PC] -- 操作系统: [e.g. iOS 8.1, Windows 10] -- 浏览器 [e.g. Chrome 66, Safari 11.2] -- live2d-widget: [e.g. 3.0.0] -> 使用 `npm ls live2d-widget` 来获取当前插件版本. - -**额外的信息** -请在此处描述其他的内容 - -- [ ] 我已仔细阅读[CONTRIBUTING](CONTRIBUTING.md)中的相关内容。 - -- [ ] 我已仔细阅读[README](../README.md)中的相关内容。 - -> 将 `[ ]` 变为 `[x]` 来表示我接受了这些问题。 - -@EYHN @xiazeyu diff --git a/.github/ISSUE_TEMPLATE/bug-report-----.md b/.github/ISSUE_TEMPLATE/bug-report-----.md index 4f93ece..1b7382d 100644 --- a/.github/ISSUE_TEMPLATE/bug-report-----.md +++ b/.github/ISSUE_TEMPLATE/bug-report-----.md @@ -1,67 +1,49 @@ --- -name: Bug report 错误报告 -about: Create a report to help us improve 创造一个报告以便更好地迭代 +name: 错误报告 +about: 创造一个报告以便更好地迭代 --- -**Describe the bug** **描述你的问题** -A clear and concise description of what the bug is. 请简明清晰地描述您所遇到的问题 -**To Reproduce** **复现步骤** -Steps to reproduce the behavior: 复现此问题的步骤 -URL 出现问题的网站地址: -Console output 控制台输出: -1. Go to '...' -打开'...' -2. Click on '....' -双击'...' -3. Scroll down to '....' -滑动到'...' -4. See error of '...' -发现'...'错误 +出现问题的网站地址: +加载命令: +```js + +L2Dwidget.init(); + +``` +控制台输出: + +1. 打开'...' +2. 双击'...' +3. 滑动到'...' +4. 发现'...'错误 -**Expected behavior** **预期的行为** -A clear and concise description of what you expected to happen. 请简明清晰地描述此操作预期的结果 -**Screenshots** **屏幕截图** -If applicable, add screenshots to help explain your problem. 如果可能, 请添加一些屏幕截图来更好地描述你的问题 -**Environment (please complete the following information):** **环境信息(请务必填写下列信息)** - - Device: [e.g. iPhone 6, PC] - - OS操作系统: [e.g. iOS 8.1, Windows 10] - - Browser浏览器 [e.g. Chrome 66, Safari 11.2] - - live2d-widget: [e.g. 3.0.0] -> use `npm ls live2d-widget` to get current plugin's version. -使用 `npm ls live2d-widget` 来获取当前插件版本. -- Command of loading加载命令: -```js - -L2Dwidget.init(); - -``` +- 设备: [e.g. iPhone 6, PC] +- 操作系统: [e.g. iOS 8.1, Windows 10] +- 浏览器 [e.g. Chrome 66, Safari 11.2] +- live2d-widget: [e.g. 3.0.0] +> 使用 `npm ls live2d-widget` 来获取当前插件版本. -**Additional context** **额外的信息** -Add any other context about the problem here. 请在此处描述其他的内容 -- [ ] I have alreday read instructions in [CONTRIBUTING](CONTRIBUTING.md). - 我已仔细阅读[CONTRIBUTING](CONTRIBUTING.md)中的相关内容。 +- [ ] 我已仔细阅读[CONTRIBUTING](CONTRIBUTING.md)中的相关内容。 -- [ ] I have alreday read instructions in [README](../README.md). - 我已仔细阅读[README](../README.md)中的相关内容。 +- [ ] 我已仔细阅读[README](../README.md)中的相关内容。 -> Change the `[ ]` into `[x]` to show your acceptance. -将 `[ ]` 变为 `[x]` 来表示你接受了这些问题。 +> 将 `[ ]` 变为 `[x]` 来表示我接受了这些问题。 @EYHN @xiazeyu diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d048447..6846ee9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -30,10 +30,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - - Device: [e.g. iPhone 6, PC] - - OS: [e.g. iOS 8.1, Windows 10] - - Browser [e.g. Chrome 66, Safari 11.2] - - live2d-widget: [e.g. 3.0.0] +- Device: [e.g. iPhone 6, PC] +- OS: [e.g. iOS 8.1, Windows 10] +- Browser [e.g. Chrome 66, Safari 11.2] +- live2d-widget: [e.g. 3.0.0] > use `npm ls live2d-widget` to get current plugin's version. **Additional context** diff --git a/.github/ISSUE_TEMPLATE/feature-request------.md b/.github/ISSUE_TEMPLATE/feature-request------.md index 3ca747e..2ee989f 100644 --- a/.github/ISSUE_TEMPLATE/feature-request------.md +++ b/.github/ISSUE_TEMPLATE/feature-request------.md @@ -1,25 +1,17 @@ --- -name: Feature request 请求新功能 -about: Suggest an idea for this project 为我提一个新想法 +name: 请求新功能 +about: 为我提一个新想法 --- -**Is your feature request related to a problem? Please describe.** **你的新功能与某一个问题有关吗?** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 请简明清晰地描述你的问题, 例如: 我常常因为 [...] 而失望 -**Describe the solution you'd like** **你的方案是** -A clear and concise description of what you want to happen. 请简明清晰地描述你的方案 -**Describe alternatives you've considered** **一些你考虑过的替代方案有** -A clear and concise description of any alternative solutions or features you've considered. 请简明清晰地描述你的考虑过的替代方案或功能 -**Additional context** **额外的信息** -Add any other context or screenshots about the feature request here. 请在此处描述其他的内容或者一些有关此功能的截图 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fd691a8..f982730 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,23 +1,19 @@ -Fix # , Re #. +# Pull request -Changes proposed in this pr: +Fix # , Re # . +Changes proposed in this pr: 此pr的改变: -- - -- +- . -- - -- [ ] I have alreday read instructions in [CONTRIBUTING](./CONTRIBUTING.md). -我已仔细阅读[CONTRIBUTING](./CONTRIBUTING.md)中的相关内容。 +- [ ] I have alreday read instructions in [CONTRIBUTING](./CONTRIBUTING.md). + 我已仔细阅读[CONTRIBUTING](./CONTRIBUTING.md)中的相关内容。 - [ ] *NOT NECESSARY* I'm sure that this pr works properly in my testing environment. -*非必需* 提交的更改在我的测试环境运行正常 - -> Change the `[ ]` into `[x]` to show your acceptance. -将 `[ ]` 变为 `[x]` 来表示你接受了这些问题。 + *非必需* 提交的更改在我的测试环境运行正常 +> Change the `[ ]` into `[x]` to show my acceptance. +将 `[ ]` 变为 `[x]` 来表示我接受了这些问题。 -@EYHN @xiazeyu +@xiazeyu @EYHN