Skip to content

Commit a14e408

Browse files
committed
feat($cli): run debug mode without clearing screen
1 parent abc86e8 commit a14e408

File tree

6 files changed

+34
-34
lines changed

6 files changed

+34
-34
lines changed

packages/@vuepress/core/lib/node/dev/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ module.exports = class DevProcess extends EventEmitter {
175175
port: this.port,
176176
displayHost: this.displayHost,
177177
publicPath: this.context.base,
178-
clearScreen: this.context.options.clearScreen
178+
clearScreen: !(this.context.options.debug || !this.context.options.clearScreen)
179179
}])
180180

181181
config = config.toConfig()

packages/@vuepress/core/lib/node/webpack/DevLogPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = class DevLogPlugin {
1717

1818
apply (compiler) {
1919
let isFirst = true
20-
const { displayHost, port, publicPath, clearScreen: shouldClearScreen = true } = this.options
20+
const { displayHost, port, publicPath, clearScreen: shouldClearScreen } = this.options
2121

2222
compiler.hooks.done.tap('vuepress-log', stats => {
2323
if (shouldClearScreen) {

packages/docs/docs/api/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ See [host](../config/README.md#host).
4040
Open browser when ready.
4141

4242
### --no-clear-screen
43-
Do not clear screen when dev server is ready.
43+
Do not clear screen when dev server is ready. Note that dev server will not clear screen if you start it in debug mode.
4444

4545
## eject
4646

packages/docs/docs/zh/api/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ vuepress <command> targetDir [options]
4040
当服务端准备就绪时自动打开浏览器。
4141

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

4545
## eject
4646

packages/vuepress/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,50 @@
22
"name": "vuepress",
33
"version": "1.2.0",
44
"description": "Minimalistic doc generator with Vue component based layout system",
5-
"main": "index.js",
5+
"keywords": [
6+
"documentation",
7+
"generator",
8+
"vue"
9+
],
10+
"homepage": "https://github.com/vuejs/vuepress#readme",
11+
"bugs": {
12+
"url": "https://github.com/vuejs/vuepress/issues"
13+
},
614
"repository": {
715
"type": "git",
816
"url": "git+https://github.com/vuejs/vuepress.git",
917
"directory": "packages/vuepress"
1018
},
11-
"scripts": {
12-
"postinstall": "opencollective-postinstall || true"
13-
},
14-
"keywords": [
15-
"documentation",
16-
"vue",
17-
"generator"
18-
],
19+
"license": "MIT",
20+
"author": "Evan You",
21+
"main": "index.js",
1922
"bin": {
2023
"vuepress": "cli.js"
2124
},
22-
"author": "Evan You",
23-
"maintainers": [
24-
{
25-
"name": "ULIVZ",
26-
"email": "[email protected]"
27-
}
28-
],
29-
"license": "MIT",
30-
"bugs": {
31-
"url": "https://github.com/vuejs/vuepress/issues"
25+
"scripts": {
26+
"postinstall": "opencollective-postinstall || true"
3227
},
33-
"homepage": "https://github.com/vuejs/vuepress#readme",
28+
"browserslist": [
29+
">1%"
30+
],
3431
"dependencies": {
3532
"@vuepress/core": "^1.2.0",
3633
"@vuepress/theme-default": "^1.2.0",
37-
"cac": "^6.3.9",
34+
"cac": "^6.5.5",
3835
"envinfo": "^7.2.0",
3936
"opencollective-postinstall": "^2.0.2"
4037
},
38+
"engines": {
39+
"node": ">=8.6"
40+
},
4141
"collective": {
4242
"type": "opencollective",
4343
"url": "https://opencollective.com/vuepress"
4444
},
45-
"engines": {
46-
"node": ">=8.6"
47-
},
48-
"browserslist": [
49-
">1%"
45+
"maintainers": [
46+
{
47+
"name": "ULIVZ",
48+
"email": "[email protected]"
49+
}
5050
]
5151
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3439,10 +3439,10 @@ [email protected]:
34393439
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
34403440
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
34413441

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

34473447
cacache@^11.3.3:
34483448
version "11.3.3"

0 commit comments

Comments
 (0)