File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,20 @@ module.exports = class DevLogPlugin {
13
13
14
14
const { displayHost, port, publicPath } = this . options
15
15
const time = new Date ( ) . toTimeString ( ) . match ( / ^ [ \d : ] + / ) [ 0 ]
16
+ const displayUrl = `http://${ displayHost } :${ port } ${ publicPath } `
16
17
17
- logger . success ( `\n${ chalk . gray ( `[${ time } ]` ) } Build ${ chalk . italic ( stats . hash . slice ( 0 , 6 ) ) } finished in ${ stats . endTime - stats . startTime } ms!` )
18
+ logger . success (
19
+ `\n${ chalk . gray ( `[${ time } ]` ) } Build ${ chalk . italic ( stats . hash . slice ( 0 , 6 ) ) } ` +
20
+ `finished in ${ stats . endTime - stats . startTime } ms! ` +
21
+ (
22
+ isFirst
23
+ ? ''
24
+ : `${ chalk . gray ( `(${ displayUrl } )` ) } `
25
+ )
26
+ )
18
27
if ( isFirst ) {
19
28
isFirst = false
20
- console . log ( `\n${ chalk . gray ( '>' ) } VuePress dev server listening at ${ chalk . cyan ( `http:// ${ displayHost } : ${ port } ${ publicPath } ` ) } ` )
29
+ console . log ( `\n${ chalk . gray ( '>' ) } VuePress dev server listening at ${ chalk . cyan ( displayUrl ) } ` )
21
30
}
22
31
} )
23
32
compiler . hooks . invalid . tap ( 'vuepress-log' , clearScreen )
You can’t perform that action at this time.
0 commit comments