Skip to content

Commit

Permalink
feat($cli): run debug mode without clearing screen (close #2100) (#2116)
Browse files Browse the repository at this point in the history
  • Loading branch information
billyyyyy3320 authored and meteorlxy committed Jan 20, 2020
1 parent df59909 commit c6a3cb5
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/node/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ module.exports = class DevProcess extends EventEmitter {
port: this.port,
displayHost: this.displayHost,
publicPath: this.context.base,
clearScreen: this.context.options.clearScreen
clearScreen: !(this.context.options.debug || !this.context.options.clearScreen)
}])

config = config.toConfig()
Expand Down
2 changes: 1 addition & 1 deletion packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = class DevLogPlugin {

apply (compiler) {
let isFirst = true
const { displayHost, port, publicPath, clearScreen: shouldClearScreen = true } = this.options
const { displayHost, port, publicPath, clearScreen: shouldClearScreen } = this.options

compiler.hooks.done.tap('vuepress-log', stats => {
if (shouldClearScreen) {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ See [host](../config/README.md#host).
Open browser when ready.

### --no-clear-screen
Do not clear screen when dev server is ready.
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

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/zh/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ vuepress <command> targetDir [options]
当服务端准备就绪时自动打开浏览器。

### --no-clear-screen
当 dev server 就绪时不清除屏幕。
当 dev server 就绪时不清除屏幕。请注意 dev server 不会在调试模式下清除屏幕。

## eject

Expand Down
52 changes: 26 additions & 26 deletions packages/vuepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@
"name": "vuepress",
"version": "1.2.0",
"description": "Minimalistic doc generator with Vue component based layout system",
"main": "index.js",
"keywords": [
"documentation",
"generator",
"vue"
],
"homepage": "https://github.com/vuejs/vuepress#readme",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vuepress.git",
"directory": "packages/vuepress"
},
"scripts": {
"postinstall": "opencollective-postinstall || true"
},
"keywords": [
"documentation",
"vue",
"generator"
],
"license": "MIT",
"author": "Evan You",
"main": "index.js",
"bin": {
"vuepress": "cli.js"
},
"author": "Evan You",
"maintainers": [
{
"name": "ULIVZ",
"email": "chl814@foxmail.com"
}
],
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
"scripts": {
"postinstall": "opencollective-postinstall || true"
},
"homepage": "https://github.com/vuejs/vuepress#readme",
"browserslist": [
">1%"
],
"dependencies": {
"@vuepress/core": "^1.2.0",
"@vuepress/theme-default": "^1.2.0",
"cac": "^6.3.9",
"cac": "^6.5.5",
"envinfo": "^7.2.0",
"opencollective-postinstall": "^2.0.2",
"update-notifier": "^4.0.0"
},
"engines": {
"node": ">=8.6"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/vuepress"
},
"engines": {
"node": ">=8.6"
},
"browserslist": [
">1%"
"maintainers": [
{
"name": "ULIVZ",
"email": "chl814@foxmail.com"
}
]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3485,10 +3485,10 @@ bytes@3.1.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==

cac@^6.3.9:
version "6.5.3"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.5.3.tgz#dcd8b7496b563b87e8a1fc69e3118bdf29c781f2"
integrity sha512-wZfzSWVXuue1H3J7TDNjbzg4KTqPXCmh7F3QIzEYXfnhMCcOUrx99M7rpO2UDVJA9dqv3butGj2nHvCV47CmPg==
cac@^6.5.5:
version "6.5.5"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.5.5.tgz#fb7720ecb95988d1425e5b4a2db41f6c5cd6e672"
integrity sha512-DF1HgrY2BkyrY1+g3Fwk/HFUcycI1PHpV3hCCxHM9qAPe+nrIOKFbzej2uiWdAjw4ry5eSYVWR4MLQYp2nV5YA==

cacache@^11.3.3:
version "11.3.3"
Expand Down

0 comments on commit c6a3cb5

Please sign in to comment.