diff --git a/bin/vuepress.js b/bin/vuepress.js index e16c7796f7..00ea5bdfe2 100755 --- a/bin/vuepress.js +++ b/bin/vuepress.js @@ -36,7 +36,8 @@ program .description('build dir as static site') .option('-d, --dest ', 'specify build output dir (default: .vuepress/dist)') .option('--debug', 'build in development mode for debugging') - .action((dir = '.', { debug, outDir }) => { + .action((dir = '.', { debug, dest }) => { + const outDir = dest ? path.resolve(dest) : null wrapCommand(build)(path.resolve(dir), { debug, outDir }) })