From d6acdc821f70e4d1260977e7b241851994914afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sun, 11 Sep 2022 16:45:16 +0800 Subject: [PATCH] docs: move documentations to docs (#9733) --- .../workflows/post-lint-commit-message.yml | 4 +-- CONTRIBUTING.md | 4 +-- .../.vitepress/crowdin/en-US/pages/guide.json | 12 +++++++++ .../en-US/guide/commit-examples.md | 12 +++++---- DEV_FAQ.md => docs/en-US/guide/dev-faq.md | 3 ++- LOCAL_DEV.md => docs/en-US/guide/dev-guide.md | 27 +++++-------------- 6 files changed, 32 insertions(+), 30 deletions(-) rename commit-example.md => docs/en-US/guide/commit-examples.md (93%) rename DEV_FAQ.md => docs/en-US/guide/dev-faq.md (95%) rename LOCAL_DEV.md => docs/en-US/guide/dev-guide.md (60%) diff --git a/.github/workflows/post-lint-commit-message.yml b/.github/workflows/post-lint-commit-message.yml index 8865921baa..fd93700ee5 100644 --- a/.github/workflows/post-lint-commit-message.yml +++ b/.github/workflows/post-lint-commit-message.yml @@ -81,9 +81,9 @@ jobs: ${{ steps.read.outputs.content }} ``` - Please refer to [Commit Example](https://github.com/element-plus/element-plus/blob/dev/commit-example.md) for fixing it. + Please refer to [Commit Example](https://element-plus.org/en-US/guide/commit-examples.html) for fixing it. - 请参考 [提交示例](https://github.com/element-plus/element-plus/blob/dev/commit-example.md) 来修改你的提交消息。 + 请参考 [提交示例](https://element-plus.org/en-US/guide/commit-examples.html) 来修改你的提交消息。 Note that all your commits will be squashed into one for being linted, so you might need to revision your commits. If you do not know how to do so, please refer to [Keeping git commit history clean](https://about.gitlab.com/blog/2018/06/07/keeping-git-commit-history-clean/) to update your commit message. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3c9864f4d8..827af3293b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ touch play/src/App.vue # Adding an entry for the play to run. pnpm run dev ``` -You can follow the [LOCAL DEVELOPMENT GUIDE](https://github.com/element-plus/element-plus/blob/dev/LOCAL_DEV.md) to do development more quickly. +You can follow the [LOCAL DEVELOPMENT GUIDE](https://element-plus.org/en-US/guide/dev-guide.html) to do development more quickly. ### Compile the source code @@ -110,7 +110,7 @@ pnpm cz 2. You can also write the commit message by hand, but make sure your commit message follows the rules. -We have a [commit template](https://github.com/element-plus/element-plus/blob/dev/commit-example.md) +We have a [commit template](https://element-plus.org/en-US/guide/commit-examples.html) NOTE: **PRs with unformatted commit message WILL NOT BE ACCEPTED** diff --git a/docs/.vitepress/crowdin/en-US/pages/guide.json b/docs/.vitepress/crowdin/en-US/pages/guide.json index 5b66f57f80..6040e01742 100644 --- a/docs/.vitepress/crowdin/en-US/pages/guide.json +++ b/docs/.vitepress/crowdin/en-US/pages/guide.json @@ -58,6 +58,18 @@ "development": { "text": "Development", "children": [ + { + "text": "Development Guide", + "link": "/guide/dev-guide" + }, + { + "text": "Development FAQ", + "link": "/guide/dev-faq" + }, + { + "text": "Commit Examples", + "link": "/guide/commit-examples" + }, { "text": "Translation", "link": "/guide/translation" diff --git a/commit-example.md b/docs/en-US/guide/commit-examples.md similarity index 93% rename from commit-example.md rename to docs/en-US/guide/commit-examples.md index eea74bd126..60435ae44d 100644 --- a/commit-example.md +++ b/docs/en-US/guide/commit-examples.md @@ -1,4 +1,6 @@ -# Why this chapter exists +# Commit Examples + +## Why this chapter exists Please refer to [Conventional Commits](https://www.conventionalcommits.org/) for more information. @@ -7,7 +9,7 @@ A good commit message enables us: 1. To understand what the contributor is trying to do 2. Automatically generates change log -## Rule for writing commit message +### Rule for writing commit message ```md # (If applied, this commit will...) (Max 72 characters) @@ -55,7 +57,7 @@ A good commit message enables us: # -------------------- ``` -## Template for commit messages +### Template for commit messages Below is a template commit message for your reference. @@ -72,12 +74,12 @@ Please do not exceeds 72 characters per line, because that would be harder to co For the subject header, the format is: -```md +``` [type](scope): [messages] ``` You can checkout the allowed values for **type** and **scope** in [commitlint.config.js](https://github.com/element-plus/element-plus/blob/c2ee36a7fc72b17742d43ecdff4e2912c416141d/commitlint.config.js#L57), -## Useful links +### Useful links [Keeping git commit history clean](https://about.gitlab.com/blog/2018/06/07/keeping-git-commit-history-clean/) diff --git a/DEV_FAQ.md b/docs/en-US/guide/dev-faq.md similarity index 95% rename from DEV_FAQ.md rename to docs/en-US/guide/dev-faq.md index 05fbbbd811..3abe05fccf 100644 --- a/DEV_FAQ.md +++ b/docs/en-US/guide/dev-faq.md @@ -1,10 +1,11 @@ -# DEV FAQ +# Development FAQ Here are the problems that are easy to encounter in development. ## If you encounter dependency related issues ```bash +rm -fr node_modules pnpm i ``` diff --git a/LOCAL_DEV.md b/docs/en-US/guide/dev-guide.md similarity index 60% rename from LOCAL_DEV.md rename to docs/en-US/guide/dev-guide.md index 83b90dd1da..7754b6b068 100644 --- a/LOCAL_DEV.md +++ b/docs/en-US/guide/dev-guide.md @@ -1,49 +1,36 @@ # Local Development -## Generate new component - -With command - -```bash -$ pnpm gen component-name -``` - -Note the `component-name` must be in `kebab-case`, combining words by replacing each space with a dash. - -And component type must be added to `typings/global.d.ts`. - ## Bootstrap project With command ```bash -$ pnpm i +pnpm i ``` -the project will install all dependencies +the project will install all dependencies. ## Website preview With command ```bash -$ pnpm docs:gen-locale -$ pnpm docs:dev +pnpm docs:dev ``` -the project will launch website for you to preview all existing component +the project will launch website for you to preview all existing component. ## Local development -See [Local development guide](https://github.com/element-plus/element-plus/CONTRIBUTING.md) +See [Local development guide](https://github.com/element-plus/element-plus/blob/dev/CONTRIBUTING.md) 1. With command ```shell -$ pnpm dev +pnpm dev ``` -will start the local development environment +will start the local development environment. 2. Add your component into `play/src/App.vue`