@@ -33,6 +33,11 @@ yargs.options({
33
33
type : "boolean" ,
34
34
describe : "Lazy"
35
35
} ,
36
+ "inline" : {
37
+ type : "boolean" ,
38
+ default : true ,
39
+ describe : "Inline mode"
40
+ } ,
36
41
"stdin" : {
37
42
type : "boolean" ,
38
43
describe : "close when stdin ends"
@@ -44,6 +49,7 @@ yargs.options({
44
49
"info" : {
45
50
type : "boolean" ,
46
51
group : DISPLAY_GROUP ,
52
+ default : true ,
47
53
describe : "Info"
48
54
} ,
49
55
"quiet" : {
@@ -197,8 +203,8 @@ if(argv["key"])
197
203
if ( argv [ "cacert" ] )
198
204
options . cacert = fs . readFileSync ( path . resolve ( argv [ "cacert" ] ) ) ;
199
205
200
- if ( argv [ "inline" ] )
201
- options . inline = true ;
206
+ if ( argv [ "inline" ] === false )
207
+ options . inline = false ;
202
208
203
209
if ( argv [ "history-api-fallback" ] )
204
210
options . historyApiFallback = true ;
@@ -211,7 +217,7 @@ if(argv["open"])
211
217
212
218
var protocol = options . https ? "https" : "http" ;
213
219
214
- if ( options . inline ) {
220
+ if ( options . inline !== false ) {
215
221
var devClient = [ require . resolve ( "../client/" ) + "?" + protocol + "://" + ( options . public || ( options . host + ":" + options . port ) ) ] ;
216
222
217
223
if ( options . hot )
@@ -228,12 +234,13 @@ if(options.inline) {
228
234
}
229
235
230
236
new Server ( webpack ( wpOpt ) , options ) . listen ( options . port , options . host , function ( err ) {
237
+ if ( err ) throw err ;
238
+
231
239
var uri = protocol + "://" + options . host + ":" + options . port + "/" ;
232
- if ( ! options . inline )
240
+ if ( options . inline === false )
233
241
uri += "webpack-dev-server/" ;
234
-
235
- if ( err ) throw err ;
236
242
console . log ( uri ) ;
243
+
237
244
console . log ( "webpack result is served from " + options . publicPath ) ;
238
245
if ( Array . isArray ( options . contentBase ) )
239
246
console . log ( "content is served from " + options . contentBase . join ( ", " ) ) ;
0 commit comments