From 50e10d5b77e7bc56b950b56291375cccedc2d670 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Mon, 25 Mar 2019 17:02:39 +0800 Subject: [PATCH 1/2] add dest option --- packages/docs/docs/api/cli.md | 5 ++++- packages/docs/docs/zh/api/cli.md | 7 +++++-- packages/vuepress/lib/registerCoreCommands.js | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/docs/docs/api/cli.md b/packages/docs/docs/api/cli.md index d9d6b13a5b..76154de439 100644 --- a/packages/docs/docs/api/cli.md +++ b/packages/docs/docs/api/cli.md @@ -16,10 +16,13 @@ See [port](../config/README.md#port). ### -t, --temp `` See [temp](../config/README.md#temp). -### -c, --cache [cache] +### -c, --cache `[cache]` ### -no--cache See [cache](../config/README.md#cache). +### --dest `` +See [dest](../config/README.md#dest). + ### --debug Start development server in debug mode. diff --git a/packages/docs/docs/zh/api/cli.md b/packages/docs/docs/zh/api/cli.md index f7f2436dce..18eaf7e24e 100644 --- a/packages/docs/docs/zh/api/cli.md +++ b/packages/docs/docs/zh/api/cli.md @@ -16,10 +16,13 @@ vuepress targetDir [options] ### -t, --temp `` 查看 [temp](../config/README.md#temp)。 -### -c, --cache [cache] -### -no--cache [cache] +### -c, --cache `[cache]` +### -no--cache 查看 [cache](../config/README.md#cache)。 +### --dest `` +查看 [dest](../config/README.md#dest)。 + ### --debug 以调试模式启动开发服务器。 diff --git a/packages/vuepress/lib/registerCoreCommands.js b/packages/vuepress/lib/registerCoreCommands.js index edca5b2195..0663a57b58 100644 --- a/packages/vuepress/lib/registerCoreCommands.js +++ b/packages/vuepress/lib/registerCoreCommands.js @@ -18,6 +18,7 @@ module.exports = function (cli, options) { .option('-p, --port ', 'use specified port (default: 8080)') .option('-t, --temp ', 'set the directory of the temporary file') .option('-c, --cache [cache]', 'set the directory of cache') + .option('--dest ', 'the output directory for build process') .option('--host ', 'use specified host (default: 0.0.0.0)') .option('--no-cache', 'clean the cache before build') .option('--no-clear-screen', 'do not clear screen when dev server is ready') From 1815bd241b13cf465740cb0b783e2d71240c8147 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Wed, 27 Mar 2019 00:19:06 +0800 Subject: [PATCH 2/2] add dest to build options --- packages/vuepress/lib/registerCoreCommands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vuepress/lib/registerCoreCommands.js b/packages/vuepress/lib/registerCoreCommands.js index 0663a57b58..ee0a78fdd3 100644 --- a/packages/vuepress/lib/registerCoreCommands.js +++ b/packages/vuepress/lib/registerCoreCommands.js @@ -18,7 +18,6 @@ module.exports = function (cli, options) { .option('-p, --port ', 'use specified port (default: 8080)') .option('-t, --temp ', 'set the directory of the temporary file') .option('-c, --cache [cache]', 'set the directory of cache') - .option('--dest ', 'the output directory for build process') .option('--host ', 'use specified host (default: 0.0.0.0)') .option('--no-cache', 'clean the cache before build') .option('--no-clear-screen', 'do not clear screen when dev server is ready') @@ -45,6 +44,7 @@ module.exports = function (cli, options) { .option('-d, --dest ', 'specify build output dir (default: .vuepress/dist)') .option('-t, --temp ', 'set the directory of the temporary file') .option('-c, --cache [cache]', 'set the directory of cache') + .option('--dest ', 'the output directory for build process') .option('--no-cache', 'clean the cache before build') .option('--debug', 'build in development mode for debugging') .option('--silent', 'build static site in silent mode')