Skip to content

Commit

Permalink
docs(cli): add dark mode part into docs
Browse files Browse the repository at this point in the history
affects: @varlet/cli, @varlet/ui
  • Loading branch information
haoziqaq committed Nov 16, 2021
1 parent e9ec891 commit 647467f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 12 deletions.
14 changes: 12 additions & 2 deletions packages/varlet-cli/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The out-of-the-box `Vue3 component library` rapid prototyping tool provides a se
- 6.Unit testing tools out of the box
- 7.Out-of-the-box code publishing tool, publish to npm and github, and automatically generate a change log
- 8.Support `Typescript`
- 9.Support `Dark Mode`

### Quickstart

Expand Down Expand Up @@ -49,6 +50,7 @@ The `varlet.config.js` in the project root directory is used to manage the speci
| `defaultLanguage` | Document default language | _string_ | `zh-CN` |
| `useMobile` | Whether to display the right mobile phone preview | _boolean_ | `false` |
| `themes` | Document themes | _SiteThemes_ | `-` |
| `darkThemes` | Document dark mode themes | _SiteThemes_ | `-` |
| `highlight` | Document code snippet style related | _SiteHighlight_ | `-` |
| `analysis` | Document statistics related | _SiteAnalysis_ | `-` |
| `pc` | PC-side document structure configuration | _SitePC_ | `-` |
Expand All @@ -62,6 +64,14 @@ subject to the theme of the `varlet` official document

| Variable |
| ----- |
| `color-body` |
| `color-bar` |
| `color-sub-bar` |
| `color-text` |
| `color-sub-text` |
| `color-border` |
| `color-shadow` |
| `color-introduce-border` |
| `color-primary` |
| `color-link` |
| `color-type` |
Expand All @@ -70,10 +80,10 @@ subject to the theme of the `varlet` official document
| `color-side-bar` |
| `color-side-bar-active-background` |
| `color-app-bar` |
| `color-mobile-cell-hover` |
| `color-mobile-cell-hover-background` |
| `color-nav-button-hover-background` |
| `color-pc-language-active` |
| `color-pc-language-active-background` |
| `color-mobile-cell-hover` |
| `color-mobile-language-active` |
| `color-mobile-language-active-background` |

Expand Down
14 changes: 12 additions & 2 deletions packages/varlet-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- 6.开箱即用的单元测试工具
- 7.开箱即用的代码发布工具,发布到npm和github,并自动生成更新日志
- 8.支持`Typescript`
- 9.支持`暗黑模式`

### 快速开始

Expand Down Expand Up @@ -47,6 +48,7 @@ yarn dev
| `defaultLanguage` | 文档默认语言 | _string_ | `zh-CN` |
| `useMobile` | 是否显示右侧手机预览 | _boolean_ | `false` |
| `themes` | 文档主题 | _SiteThemes_ | `-` |
| `darkThemes` | 暗黑模式文档主题 | _SiteThemes_ | `-` |
| `highlight` | 文档代码片段样式相关 | _SiteHighlight_ | `-` |
| `analysis` | 文档统计相关 | _SiteAnalysis_ | `-` |
| `pc` | pc端文档结构配置 | _SitePC_ | `-` |
Expand All @@ -58,6 +60,14 @@ yarn dev

| 参数 |
| ----- |
| `color-body` |
| `color-bar` |
| `color-sub-bar` |
| `color-text` |
| `color-sub-text` |
| `color-border` |
| `color-shadow` |
| `color-introduce-border` |
| `color-primary` |
| `color-link` |
| `color-type` |
Expand All @@ -66,10 +76,10 @@ yarn dev
| `color-side-bar` |
| `color-side-bar-active-background` |
| `color-app-bar` |
| `color-mobile-cell-hover` |
| `color-mobile-cell-hover-background` |
| `color-nav-button-hover-background` |
| `color-pc-language-active` |
| `color-pc-language-active-background` |
| `color-mobile-cell-hover` |
| `color-mobile-language-active` |
| `color-mobile-language-active-background` |

Expand Down
22 changes: 16 additions & 6 deletions packages/varlet-ui/docs/cli.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ The out-of-the-box `Vue3 component library` rapid prototyping tool provides a se
- 6.Unit testing tools out of the box
- 7.Out-of-the-box code publishing tool, publish to npm and github, and automatically generate a change log
- 8.Support `Typescript`
- 9.Support `Dark Mode`

### Quickstart

`@varlet/cli` has built-in `single file component (sfc)` and `tsx, jsx` two styles of component library project templates, which can be directly generated by the `gen` command.
To help users directly enter the development of the component itself, it is recommended to use `yarn` as a package management tool. First, make sure that `yarn` is installed and added to the system environment variables.
To help users directly enter the development of the component itself, it is recommended to use `yarn` as a package management tool. First, make sure that `yarn` is installed and added to the system environment variables.
The installation and configuration methods of `yarn` are not introduced here.

```shell
Expand Down Expand Up @@ -49,19 +50,28 @@ The `varlet.config.js` in the project root directory is used to manage the speci
| `defaultLanguage` | Document default language | _string_ | `zh-CN` |
| `useMobile` | Whether to display the right mobile phone preview | _boolean_ | `false` |
| `themes` | Document themes | _SiteThemes_ | `-` |
| `darkThemes` | Document dark mode themes | _SiteThemes_ | `-` |
| `highlight` | Document code snippet style related | _SiteHighlight_ | `-` |
| `analysis` | Document statistics related | _SiteAnalysis_ | `-` |
| `pc` | PC-side document structure configuration | _SitePC_ | `-` |
| `mobile` | Mobile document structure configuration | _SiteMobile_ | `-` |

#### SiteThemes

Theme variables are related,
Theme variables are related,
because the default theme variables may be modified from time to time,
subject to the theme of the `varlet` official document

| Variable |
| ----- |
| `color-body` |
| `color-bar` |
| `color-sub-bar` |
| `color-text` |
| `color-sub-text` |
| `color-border` |
| `color-shadow` |
| `color-introduce-border` |
| `color-primary` |
| `color-link` |
| `color-type` |
Expand All @@ -70,10 +80,10 @@ subject to the theme of the `varlet` official document
| `color-side-bar` |
| `color-side-bar-active-background` |
| `color-app-bar` |
| `color-mobile-cell-hover` |
| `color-mobile-cell-hover-background` |
| `color-nav-button-hover-background` |
| `color-pc-language-active` |
| `color-pc-language-active-background` |
| `color-mobile-cell-hover` |
| `color-mobile-language-active` |
| `color-mobile-language-active-background` |

Expand Down Expand Up @@ -242,7 +252,7 @@ module.exports = {

#### git-hook

`husky`, `lint-staged` cooperate with `eslint`, `stylelint`, `commitlint` to check before commit,
`husky`, `lint-staged` cooperate with `eslint`, `stylelint`, `commitlint` to check before commit,
`package.json` configuration is as follows

```json
Expand Down Expand Up @@ -335,7 +345,7 @@ create `tsconfig.json`

### Release code

Use `release-it` and `conventional-changelog` for code release and update log generation.
Use `release-it` and `conventional-changelog` for code release and update log generation.
The configuration of `package.json` is as follows

```json
Expand Down
14 changes: 12 additions & 2 deletions packages/varlet-ui/docs/cli.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- 6.开箱即用的单元测试工具
- 7.开箱即用的代码发布工具,发布到npm和github,并自动生成更新日志
- 8.支持`Typescript`
- 9.支持`暗黑模式`

### 快速开始

Expand Down Expand Up @@ -47,6 +48,7 @@ yarn dev
| `defaultLanguage` | 文档默认语言 | _string_ | `zh-CN` |
| `useMobile` | 是否显示右侧手机预览 | _boolean_ | `false` |
| `themes` | 文档主题 | _SiteThemes_ | `-` |
| `darkThemes` | 暗黑模式文档主题 | _SiteThemes_ | `-` |
| `highlight` | 文档代码片段样式相关 | _SiteHighlight_ | `-` |
| `analysis` | 文档统计相关 | _SiteAnalysis_ | `-` |
| `pc` | pc端文档结构配置 | _SitePC_ | `-` |
Expand All @@ -58,6 +60,14 @@ yarn dev

| 参数 |
| ----- |
| `color-body` |
| `color-bar` |
| `color-sub-bar` |
| `color-text` |
| `color-sub-text` |
| `color-border` |
| `color-shadow` |
| `color-introduce-border` |
| `color-primary` |
| `color-link` |
| `color-type` |
Expand All @@ -66,10 +76,10 @@ yarn dev
| `color-side-bar` |
| `color-side-bar-active-background` |
| `color-app-bar` |
| `color-mobile-cell-hover` |
| `color-mobile-cell-hover-background` |
| `color-nav-button-hover-background` |
| `color-pc-language-active` |
| `color-pc-language-active-background` |
| `color-mobile-cell-hover` |
| `color-mobile-language-active` |
| `color-mobile-language-active-background` |

Expand Down

0 comments on commit 647467f

Please sign in to comment.