Skip to content

Commit

Permalink
Don't output startup info if quiet is set to true (#970)
Browse files Browse the repository at this point in the history
* Don't output startup info if noInfo is set to true

* Fix lint problems

* Use 'quiet' instead of 'noInfo' to hide messages
  • Loading branch information
larsbs authored and shellscape committed Jul 10, 2017
1 parent 9188878 commit 140da45
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bin/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,15 @@ function startDevServer(wpOpt, options) {

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

console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);
console.log(`webpack output is served from ${colorInfo(useColor, options.publicPath)}`);
}
const contentBase = Array.isArray(options.contentBase) ? options.contentBase.join(", ") : options.contentBase;
if(contentBase)
console.log(`Content not from webpack is served from ${colorInfo(useColor, contentBase)}`);
Expand Down

0 comments on commit 140da45

Please sign in to comment.