Skip to content

Commit 140da45

Browse files
larsbsshellscape
authored andcommitted
Don't output startup info if quiet is set to true (#970)
* Don't output startup info if noInfo is set to true * Fix lint problems * Use 'quiet' instead of 'noInfo' to hide messages
1 parent 9188878 commit 140da45

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

bin/webpack-dev-server.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,15 @@ function startDevServer(wpOpt, options) {
440440

441441
function reportReadiness(uri, options) {
442442
const useColor = argv.color;
443-
let startSentence = `Project is running at ${colorInfo(useColor, uri)}`
444-
if(options.socket) {
445-
startSentence = `Listening to socket at ${colorInfo(useColor, options.socket)}`;
446-
}
447-
console.log((argv["progress"] ? "\n" : "") + startSentence);
443+
if(!options.quiet) {
444+
let startSentence = `Project is running at ${colorInfo(useColor, uri)}`
445+
if(options.socket) {
446+
startSentence = `Listening to socket at ${colorInfo(useColor, options.socket)}`;
447+
}
448+
console.log((argv["progress"] ? "\n" : "") + startSentence);
448449

449-
console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);
450+
console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);
451+
}
450452
const contentBase = Array.isArray(options.contentBase) ? options.contentBase.join(", ") : options.contentBase;
451453
if(contentBase)
452454
console.log(`Content not from webpack is served from ${colorInfo(useColor, contentBase)}`);

0 commit comments

Comments
 (0)