|
| 1 | +## Development Setup |
| 2 | + |
| 3 | +This project uses a monorepo setup that requires using [Yarn](https://yarnpkg.com) because it relies on [Yarn workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/). |
| 4 | + |
| 5 | +``` sh |
| 6 | +# Install dependencies & compile TypeScript utilities. |
| 7 | +yarn bootstrap |
| 8 | + |
| 9 | +# Clean dependencies. |
| 10 | +yarn clean |
| 11 | + |
| 12 | +# Useful when creating new submodules. |
| 13 | +yarn boot |
| 14 | + |
| 15 | +# Serve the docs. |
| 16 | +yarn dev |
| 17 | + |
| 18 | +# Build the docs. |
| 19 | +yarn build |
| 20 | + |
| 21 | +# Execute all the test suites. |
| 22 | +yarn test |
| 23 | +``` |
| 24 | + |
| 25 | +## Core packages |
| 26 | + |
| 27 | +- **docs**: Docs of VuePress (do not publish to npm). |
| 28 | +- **vuepress**: VuePress CLI. |
| 29 | +- **packages** |
| 30 | + - `core`: containing the Node.js API, the Plugin API, the Theme API, the Client SPA, etc. |
| 31 | + - `markdown`: internal Markdown compiler. |
| 32 | + - `markdown-loader`: internal Markdown loader. |
| 33 | + - `plugin-active-header-links`: a plugin for active sidebar heading links. |
| 34 | + - `plugin-google-analytics`: Google Analytics integration. |
| 35 | + - `plugin-last-updated`: implementation of "last updated" feature. |
| 36 | + - `plugin-medium-zoom`: `medium-zoom` integration. |
| 37 | + - `plugin-nprogress`: `nprogress` integration. |
| 38 | + - `plugin-pwa`: PWA plugin. |
| 39 | + - `plugin-search`: search plugin, providing the `SearchBox` component. |
| 40 | + - `shared-utils`: TypeScript utilities. |
| 41 | + - `test-utils`: test utilities. |
| 42 | + - `theme-default`: default theme. |
| 43 | + - `theme-vue`: a theme tweak from default theme, used for the official Vue project. |
| 44 | + |
| 45 | +## Core packages not in main project |
| 46 | + |
| 47 | +> Previously, for quick iteration, these projects were kept in ULIVZ's workspace. In the future, we may want to build an independent GitHub group. |
| 48 | +
|
| 49 | +- [awesome-vuepress](https://github.com/ulivz/awesome-vuepress) |
| 50 | +- [@vuepress/plugin-blog](https://github.com/ulivz/vuepress-plugin-blog) |
| 51 | +- [@vuepress/theme-blog](https://github.com/ulivz/vuepress-theme-blog) |
| 52 | + |
| 53 | +## Workflow |
| 54 | + |
| 55 | +### Issue |
| 56 | + |
| 57 | +> TODO |
| 58 | +
|
| 59 | +### Pull requests |
| 60 | + |
| 61 | +- Create a feature branch from the default branch (`master`) and merge back against that branch. |
| 62 | +- It's OK to have multiple small commits as you work on the PR - GitHub automatically squashes them before merging. |
| 63 | +- Make sure tests pass. |
| 64 | +- If adding a new feature: |
| 65 | + - Add accompanying test case(s). |
| 66 | + - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. |
| 67 | +- If fixing bug: |
| 68 | + - If you are resolving an open issue, add `(fix #xxxx)` (`#xxxx` being the issue ID) in your PR title for a better release log, e.g. `chore(feat): implement SSR (fix #1234)`. |
| 69 | + - Provide a detailed description of the bug in the PR. Live demo preferred. |
| 70 | + - Add appropriate test coverage if applicable. |
| 71 | + |
| 72 | +### Substantial Changes |
| 73 | + |
| 74 | +> RFC flow, TODO |
| 75 | +
|
| 76 | +## Code Specification |
| 77 | + |
| 78 | +> TODO |
| 79 | +
|
| 80 | +## Commit specification |
| 81 | + |
| 82 | +Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. |
0 commit comments