Skip to content

Commit 2a80e33

Browse files
committed
config stuff
1 parent 7e2e8f8 commit 2a80e33

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

bin/webpack-dev-server.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var webpack = require("webpack");
1818

1919
var yargs = require("yargs")
2020
.usage("webpack-dev-server " + require("../package.json").version + "\n" +
21+
"webpack " + require("webpack/package.json").version + "\n" +
2122
"Usage: http://webpack.github.io/docs/webpack-dev-server.html");
2223

2324
require("webpack/bin/config-yargs")(yargs);
@@ -29,7 +30,8 @@ var RESPONSE_GROUP = "Response options:";
2930

3031
yargs.options({
3132
"lazy": {
32-
type: "boolean"
33+
type: "boolean",
34+
describe: "Lazy"
3335
},
3436
"stdin": {
3537
type: "boolean",
@@ -41,15 +43,18 @@ yargs.options({
4143
},
4244
"info": {
4345
type: "boolean",
44-
group: DISPLAY_GROUP
46+
group: DISPLAY_GROUP,
47+
describe: "Info"
4548
},
4649
"quiet": {
4750
type: "boolean",
48-
group: DISPLAY_GROUP
51+
group: DISPLAY_GROUP,
52+
describe: "Quiet"
4953
},
5054
"https": {
5155
type: "boolean",
52-
group: SSL_GROUP
56+
group: SSL_GROUP,
57+
describe: "HTTPS"
5358
},
5459
"key": {
5560
type: "string",
@@ -83,6 +88,7 @@ yargs.options({
8388
},
8489
"port": {
8590
describe: "The port",
91+
default: 8080,
8692
group: CONNECTION_GROUP
8793
},
8894
"public": {
@@ -229,7 +235,9 @@ new Server(webpack(wpOpt), options).listen(options.port, options.host, function(
229235
if(err) throw err;
230236
console.log(uri);
231237
console.log("webpack result is served from " + options.publicPath);
232-
if(typeof options.contentBase === "object")
238+
if(Array.isArray(options.contentBase))
239+
console.log("content is served from " + options.contentBase.join(", "));
240+
else if(typeof options.contentBase === "object")
233241
console.log("requests are proxied to " + options.contentBase.target);
234242
else
235243
console.log("content is served from " + options.contentBase);

0 commit comments

Comments
 (0)