Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat($cli): run debug mode without clearing screen (close #2100) #2116

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,50 +2,50 @@
"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": "[email protected]"
}
],
"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"
},
"engines": {
"node": ">=8.6"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/vuepress"
},
"engines": {
"node": ">=8.6"
},
"browserslist": [
">1%"
"maintainers": [
{
"name": "ULIVZ",
"email": "[email protected]"
}
]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3439,10 +3439,10 @@ [email protected]:
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