Skip to content

Commit

Permalink
docs: add contributing guide (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
bencodezen authored Jul 2, 2020
1 parent ad70881 commit da8df19
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Contributing

This is a guide to help those who are interested in contributing to VitePress!

## Prerequisites

- [yarn](https://classic.yarnpkg.com/en/docs/cli/install/)

## Instructions

### Setup VitePress dev environment

1. Clone the VitePress repo
1. Install dependencies
```
yarn
```
1. 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.
```
1. Start VitePress local dev environment
```bash
yarn dev
```
### Setup local VitePress project
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
```
And with that, you are now ready to contribute to the VitePress project! 🎉
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Now, with `vite` and Vue 3, it is time to rethink what a "Vue-powered static sit

Maybe! It's currently under a different name so that we don't over commit to the compatibility with the current VuePress ecosystem (mostly themes and plugins). We'll see how close we can get without compromising the design goals listed above. But the overall idea is that VitePress will have a drastically more minimal theming API (preferring JavaScript APIs instead of file layout conventions) and likely no plugins (all customization is done in themes).

## Want to contribute?

Check out our [contributing guide](https://github.com/vuejs/vitepress/blob/master/CONTRIBUTING.md) for more information!

## License

MIT

0 comments on commit da8df19

Please sign in to comment.