From 0a1e8dfb2b5575c2bfa89ffae3c82189a8ab12b5 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 8 Oct 2024 21:04:07 +0800 Subject: [PATCH] docs: add `dev.cliShortcuts` configuration (#3660) --- website/docs/en/config/dev/cli-shortcuts.mdx | 42 ++++++++++++++++++++ website/docs/zh/config/dev/cli-shortcuts.mdx | 42 ++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 website/docs/en/config/dev/cli-shortcuts.mdx create mode 100644 website/docs/zh/config/dev/cli-shortcuts.mdx diff --git a/website/docs/en/config/dev/cli-shortcuts.mdx b/website/docs/en/config/dev/cli-shortcuts.mdx new file mode 100644 index 0000000000..2832f3ef4c --- /dev/null +++ b/website/docs/en/config/dev/cli-shortcuts.mdx @@ -0,0 +1,42 @@ +# dev.cliShortcuts + +- **Type:** `boolean` +- **Default:** `true` when using Rsbuild CLI, `false` otherwise. +- **Version:** `>= 1.0.11` + +Whether to enable CLI shortcuts. + +## Example + +- Enable: + +```js +export default { + dev: { + cliShortcuts: true, + }, +}; +``` + +- Disable: + +```js +export default { + dev: { + cliShortcuts: false, + }, +}; +``` + +## All Shortcuts + +Press `h + Enter` to show all shortcuts: + +``` + Shortcuts: + c + enter clear console + o + enter open in browser + q + enter quit process + r + enter restart server + u + enter show urls +``` diff --git a/website/docs/zh/config/dev/cli-shortcuts.mdx b/website/docs/zh/config/dev/cli-shortcuts.mdx new file mode 100644 index 0000000000..945b0c648e --- /dev/null +++ b/website/docs/zh/config/dev/cli-shortcuts.mdx @@ -0,0 +1,42 @@ +# dev.cliShortcuts + +- **类型:** `boolean` +- **默认值:** 当使用 Rsbuild CLI 时默认为 `true`,否则为 `false`。 +- **版本:** `>= 1.0.11` + +是否启用 CLI 快捷键。 + +## 示例 + +- 启用: + +```js +export default { + dev: { + cliShortcuts: true, + }, +}; +``` + +- 禁用: + +```js +export default { + dev: { + cliShortcuts: false, + }, +}; +``` + +## 所有快捷键 + +按 `h + Enter` 以显示所有快捷键: + +``` + Shortcuts: + c + enter clear console + o + enter open in browser + q + enter quit process + r + enter restart server + u + enter show urls +```