Skip to content

Commit

Permalink
docs: ✏️ add contributing convention files and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lenconda committed Jun 30, 2021
1 parent 72dd9cf commit 0a9cac4
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ workflows:
only:
- /^v.*/
branches:
ignore: /.*/
only:
- master
- deploy_docs:
requires:
- install
Expand Down
98 changes: 98 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Contributing Guide

We are grateful for your selfless contribution to the project. We hope that contributing to this project would be as simple and transparent as possible, regardless whatever it is (including but not limited to):

- Reporting bugs
- Fixing bugs
- Submitting Pull Requests
- Suggestions for new feature(s)
- Becoming a maintainer (for this project)

The following content is a serial of guidelines for contributing to `Dollie.js`. Before starting your work, you are supposed to read the following advice:

- Understand what changes you want to make
- Look through the issue list and check if there's an issue to solve the same problem
- **Publish** and/or **redistribute** this project should under [MIT](LICENSE) license

## Code of Conduct

We have proposed a [Code of Conduct](CODE_OF_CONDUCT.md) to *regulate* the behavior of each participant. We sincerely hope each participant would be able to firmly entrenched to this conduct. Therefore, please take some time to read the full content in that file.

## Setup Environment

Clone repo and initialize the setup environment:

```bash
# i. install lerna
$ npm i lerna -g

# 2. clone and setup
$ git clone [email protected]:dolliejs/dollie.git
$ cd dollie && npm i && lerna bootstrap
```

## Start Developing

We provide a lot of examples, you can run the examples:

After setting up project, you can run the following command to start TSC watchers:

```bash
$ cd dollie
$ npm run watch
```

After executing the commands above, the packages will be watched to compile from TS to JS automatically.

Here is the guide for developing package `@dollie/cli`:

```bash
# 1. link the binaries
$ cd dollie/packages/@dollie/cli
$ npm link

# 2. test `dollie` command
$ dollie init foo bar
```

## Generate New Version & Publish

1. **Checkout to `master` branch**
2. Run `lerna version {major}.{minor}.{patch}`

> Please note that the version must follow the following conventions:
> The version is seperated by `major`, `minor` and `patch` parts:
> 1. `major` means major updates, usually represents the API changes or some APIs are deleted
> 2. `minor` means the new version add some new APIs or refactor the existed APIs
> 3. `patch` means some bugs are fixed
After Lerna pushing the new tags to remote origin, the CI workflow will start automatically to build and publish the new version to NPM.

## Pull Request Guidelines

- Only code that's ready for release should be committed to the master branch. All development should be done in dedicated branches.
- Checkout a **new** topic branch from master branch, and merge back against master branch.
- Make sure `npm test` passes.
- If adding new feature:
- Add accompanying test case.
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
- If fixing a bug:
- If you are resolving a special issue, add `(fix #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
- Provide detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.

## Issue Reporting Guidelines

- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately.
- For simple beginner questions, you can get quick answers from
- For more complicated questions, you can use Google or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you!
- Try to search for your issue, it may have already been answered or even fixed in the development branch.
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.
- For bugs that involves build setups, you can create a reproduction repository with steps in the README.
- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.

## Git Commit Specific

- Your commits message must follow our [git commit specific](./GIT_COMMIT_SPECIFIC.md).
- We will check your commit message, if it does not conform to the specification, the commit will be automatically refused, make sure you have read the specification above.
- You could use `git cz` with a CLI interface to replace `git commit` command, it will help you to build a proper commit-message, see [commitizen](https://github.com/commitizen/cz-cli).
32 changes: 32 additions & 0 deletions .github/GIT_COMMIT_SPECIFIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# GIT COMMIT MESSAGE CHEAT SHEET

## Proposed Format of the Commit Message

```
<type>: <subject>
<body>
```

All lines are wrapped at 100 characters !

## Allowed `<type>`

- feat (A new feature)
- fix (A bug fix)
- docs (Documentation only changes)
- style (Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc))
- perf (A code change that improves performance)
- refactor (A code change that neither fixes a bug nor adds a feature)
- test (Adding missing tests or correcting existing tests)
- build (Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm))
- ci (Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs))
- chore (Other changes that don't modify src or test files)
- revert (Reverts a previous commit)
- release (Relase version)

## Message Body

- uses the imperative, present tense: "change" not "changed" nor "changes"
- includes motivation for the change and contrasts with previous behavior
- a body is allowed to contain more than one changes, each change should use `*` as list style
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 'Bug Report'
about: 'Report Dollie.js core, cli, origins and other issues'
title: ''
labels: ''
assignees: ''
---

## What is your environment?

- Dollie.js package version
- Content of `dollie.json` or `dollie.js` in your template
- Operating system version
- Node version

## What is the current behavior?

## What is the expected behavior?
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-present Dollie.js Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ footer:

我们接受赞助,并承诺将 100% 的赞助费用都用于维护 Dollie.js,包括但不限于购买、维护 Dollie.js 文档的域名、服务器,以及支付部分核心贡献者的津贴。

在发起赞助前,请将带有你的姓名、国籍、所在国家或地区的证件号码(可以提供身份证明编号、所在国家或地区的驾驶证编号、VISA 卡号、护照编号等)、Dollie.js 帮助你解决了什么问题(可选)、感谢语(可选)等信息发送给 [[email protected]](mailto:[email protected]),在审核通过后我们将会回复一封带有收款方式的电子邮件,你可以通过这封邮件完成赞助。
在发起赞助前,请将带有你的姓名、国籍、信用卡(VISA 或 MasterCard)号、Dollie.js 帮助你解决了什么问题(可选)、感谢语(可选)等信息发送给 [email protected],审核通过后我们将会回复一封带有收款方式的电子邮件,你可以通过这封邮件完成赞助。

非常感谢你对 Dollie.js 项目及其开发者的支持!

<img
width="200"
style="display: block; margin: 50px auto;"
src="//cdn.jsdelivr.net/gh/dolliejs/dollie@master/artworks/banner_horizontal.svg"
/>
/>

0 comments on commit 0a9cac4

Please sign in to comment.