From 41d92546fb1f92f5bb06d8960f3fbd17a4939d66 Mon Sep 17 00:00:00 2001 From: ludanxer Date: Sun, 26 Jan 2020 21:15:24 +0800 Subject: [PATCH 1/3] docs: update comments in checkEnv --- packages/vuepress/lib/checkEnv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vuepress/lib/checkEnv.js b/packages/vuepress/lib/checkEnv.js index 04a57d1928..49a0352569 100644 --- a/packages/vuepress/lib/checkEnv.js +++ b/packages/vuepress/lib/checkEnv.js @@ -7,7 +7,7 @@ const { chalk, semver } = require('@vuepress/shared-utils') /** - * Expose handleUnknownCommand function. + * Check if Node version meets VuePress requirement. */ module.exports = function checkEnv (pkg) { From 84461cfdf4741daf891d98e9e7000fac78e3f83e Mon Sep 17 00:00:00 2001 From: ludanxer Date: Sun, 26 Jan 2020 21:18:00 +0800 Subject: [PATCH 2/3] docs: update cli documentation --- packages/docs/docs/api/cli.md | 52 +++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/packages/docs/docs/api/cli.md b/packages/docs/docs/api/cli.md index b28b783dfc..882c9c91b9 100644 --- a/packages/docs/docs/api/cli.md +++ b/packages/docs/docs/api/cli.md @@ -1,52 +1,74 @@ +--- +sidebarDepth: 3 +--- + # Command-line Interface +There are currently four cli commands in VuePress: [build](#build), [dev](#dev), [eject](#eject) and [info](#info). + +If they are not enough for you, you can also create [your own commands](#more-commands). + ## Usage ```bash -vuepress targetDir [options] +vuepress [options] ``` -## build +You can always add `--help` flag to get to know more about cli commands. + +## Commands + +### build Build dir as a static site. -### -p, --port `` +#### -p, --port `` + See [port](../config/README.md#port). -### -t, --temp `` +#### -t, --temp `` + See [temp](../config/README.md#temp). -### -c, --cache `[cache]` -### --no-cache +#### -c, --cache `[cache]` + +#### --no-cache + See [cache](../config/README.md#cache). -### --dest `` +#### -d, --dest `` + See [dest](../config/README.md#dest). -### --debug +#### --debug + Start development server in debug mode. -### --silent +#### --silent + Start development server in silent mode. -## dev +### dev Start a development server. All options from `vuepress build` are available. And there are several options specifically for dev: -### --host `` +#### --host `` + See [host](../config/README.md#host). -### --open +#### --open + Open browser when ready. -### --no-clear-screen +#### --no-clear-screen + Do not clear screen when dev server is ready. Note that dev server will not clear screen if you start it in debug mode. -## eject +### eject Copy the default theme into `.vuepress/theme` for customization. -## info +### info Shows debugging information about the local environment. From 29178efce0eafebe0f7639a3367e81218e8bddfe Mon Sep 17 00:00:00 2001 From: ludanxer Date: Wed, 4 Mar 2020 18:16:44 +0800 Subject: [PATCH 3/3] docs: update usage section --- packages/docs/docs/api/cli.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/docs/docs/api/cli.md b/packages/docs/docs/api/cli.md index 882c9c91b9..9f26190b6e 100644 --- a/packages/docs/docs/api/cli.md +++ b/packages/docs/docs/api/cli.md @@ -4,7 +4,7 @@ sidebarDepth: 3 # Command-line Interface -There are currently four cli commands in VuePress: [build](#build), [dev](#dev), [eject](#eject) and [info](#info). +Currently, there are four cli commands in VuePress: [build](#build), [dev](#dev), [eject](#eject) and [info](#info). If they are not enough for you, you can also create [your own commands](#more-commands). @@ -12,9 +12,15 @@ If they are not enough for you, you can also create [your own commands](#more-co ```bash vuepress [options] + +Commands: + dev [targetDir] start development server + build [targetDir] build dir as static site + eject [targetDir] copy the default theme into .vuepress/theme for customization. + info Shows debugging information about the local environment ``` -You can always add `--help` flag to get to know more about cli commands. +You can always add `--help` flag for more information. ## Commands