chore: add more info to README and other guides

pull/136/head
Kia King Ishii 4 years ago
parent e435eec94a
commit 5f56a55bf1

@ -0,0 +1,91 @@
## Git Commit Message Convention
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
#### TL;DR:
Messages must be matched by the following regex:
``` js
/^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/
```
#### Examples
Appears under "Features" header, `theme` subheader:
```
feat(theme): add home page feature
```
Appears under "Bug Fixes" header, `theme` subheader, with a link to issue #28:
```
fix(theme): remove underline on sidebar hover style
close #28
```
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
```
perf: improve store getters performance by removing 'foo' option
BREAKING CHANGE: The 'foo' option has been removed.
```
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
```
revert: feat(theme): add home page feature
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
### Full Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
### Scope
The scope could be anything specifying the place of the commit change. For example `theme`, `compiler`, `ssr`, etc...
### Subject
The subject contains a succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

@ -1,65 +1,48 @@
# VitePress Contributing Guide
This is a guide to help those who are interested in contributing to VitePress!
Hi! We're really excited that you are interested in contributing to VitePress. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
## Prerequisites
- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
- [Pull Request Guidelines](#pull-request-guidelines)
- [yarn](https://classic.yarnpkg.com/en/docs/cli/install/)
## Pull Request Guidelines
## Instructions
- Checkout a topic branch from the relevant branch, e.g. `master`, and merge back against that branch.
### Setup VitePress dev environment
- If adding a new feature:
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
- If fixing bug:
- Provide a detailed description of the bug in the PR. Live demo preferred.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated.
## Development Setup
You will need [Yarn](https://classic.yarnpkg.com/en/docs/cli/install/)/
After cloning the repo, run:
1. Clone the VitePress repo
2. Install dependencies
```
yarn
```
3. Create symlink to allow projects to link to local VitePress dev environment
```bash
yarn link
```
- If it's successful, you should see the following message:
```
success Registered "vitepress".
info You can now run `yarn link "vitepress"` in the projects where you want to use this package and it will be used instead.
✨ Done in 0.05s.
$ yarn # install the dependencies of the project
```
4. Start VitePress local dev environment
### Setup VitePress Dev Environment
You may start VitePress local dev environment by running `yarn dev`.
```bash
yarn dev
$ yarn dev
```
### Setup local VitePress project
The easiest way to start testing out VitePress is to tweak the VitePress docs. You may run `yarn docs` folder to boot up VitePress documentation site locally, with live reloading of the source code.
1. Open up terminal
1. Create a new folder
1. Initialize with `npm init`
1. Create a `docs` directory
1. Create an `index.md` file with some content inside of `/docs`
1. Add dependency to local VitePress dev environment
```bash
yarn link vitepress
```
1. Add script to run VitePress in `package.json`
- The following sample uses the command `dev` and assumes your VitePress site will live in the folder `docs`
```json
{
"name": "vitepress-project",
"dependencies": {},
"devDependencies": {},
"scripts": {
"dev": "vitepress dev docs",
"test": "echo \"Error: no test specified\" && exit 1"
}
}
```
- If successful, you should see a similar message to the following;
```
$ vitepress dev docs
vitepress v0.3.1
vite v0.20.2
listening at http://localhost:3000
$ yarn docs
```
And with that, you are now ready to contribute to the VitePress project! 🎉
After executing the above command, visit http://localhost:3000 and try modifying the source code. You'll get live update.

@ -2,15 +2,23 @@
[![npm](https://img.shields.io/npm/v/vitepress)](https://www.npmjs.com/package/vitepress)
> [VuePress](http://vuepress.vuejs.org/)' little brother, built on top of [vite](https://github.com/vuejs/vite)
---
**:fire: Note this is early WIP! Currently the focus is on making Vite stable and feature complete first. It is not recommended to use this for anything serious yet.**
---
VitePress is [VuePress](http://vuepress.vuejs.org/)' little brother, built on top of [vite](https://github.com/vuejs/vite).
## Documentation
To check out docs, visit [vitepress.vuejs.org](https://vitepress.vuejs.org).
## Want to contribute?
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/vuejs/vitepress/releases).
## Contribution
Please make sure to read the [Contributing Guide](./.github/contributing.md) before making a pull request.

Loading…
Cancel
Save