From e5bf10a5120677ebda4091e975d140a2b957abcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=9Awierk?= Date: Sat, 14 Apr 2018 21:05:58 +0200 Subject: [PATCH] Commands now defaults targetDir to cwd. --- bin/vuepress.js | 8 ++++---- docs/README.md | 4 ++-- docs/guide/getting-started.md | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/vuepress.js b/bin/vuepress.js index d948af7b37..cb5c9ca330 100755 --- a/bin/vuepress.js +++ b/bin/vuepress.js @@ -11,19 +11,19 @@ program .usage(' [options]') program - .command('dev ') + .command('dev [targetDir]') .description('start development server') .option('-p, --port ', 'use specified port (default: 8080)') - .action((dir, { port }) => { + .action((dir = '.', { port }) => { wrapCommand(dev)(path.resolve(dir), { port }) }) program - .command('build ') + .command('build [targetDir]') .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, outDir }) => { wrapCommand(build)(path.resolve(dir), { debug, outDir }) }) diff --git a/docs/README.md b/docs/README.md index 2f5387de5f..f59bfcb7e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -23,8 +23,8 @@ npm install -g vuepress echo "# Hello VuePress!" > README.md # start writing -vuepress dev . +vuepress dev # build to static files -vuepress build . +vuepress build ``` diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 7430c5026d..ebbdcd5ff6 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -12,10 +12,10 @@ npm install -g vuepress echo "# Hello VuePress!" > README.md # start writing -vuepress dev . +vuepress dev # build -vuepress build . +vuepress build ``` ## Inside an Existing Project