@@ -38,8 +38,11 @@ $(function() {
38
38
var contentPage = window . location . pathname . substr ( "/webpack-dev-server" . length ) + window . location . search ;
39
39
40
40
status . text ( "Connecting to sockjs server..." ) ;
41
- $errors . hide ( ) ; iframe . hide ( ) ;
42
- header . css ( { borderColor : "#96b5b4" } ) ;
41
+ $errors . hide ( ) ;
42
+ iframe . hide ( ) ;
43
+ header . css ( {
44
+ borderColor : "#96b5b4"
45
+ } ) ;
43
46
44
47
var onSocketMsg = {
45
48
hot : function ( ) {
@@ -49,17 +52,23 @@ $(function() {
49
52
invalid : function ( ) {
50
53
okness . text ( "" ) ;
51
54
status . text ( "App updated. Recompiling..." ) ;
52
- header . css ( { borderColor : "#96b5b4" } ) ;
53
- $errors . hide ( ) ; if ( ! hot ) iframe . hide ( ) ;
55
+ header . css ( {
56
+ borderColor : "#96b5b4"
57
+ } ) ;
58
+ $errors . hide ( ) ;
59
+ if ( ! hot ) iframe . hide ( ) ;
54
60
} ,
55
61
hash : function ( hash ) {
56
62
currentHash = hash ;
57
63
} ,
58
64
"still-ok" : function ( ) {
59
65
okness . text ( "" ) ;
60
66
status . text ( "App ready." ) ;
61
- header . css ( { borderColor : "" } ) ;
62
- $errors . hide ( ) ; if ( ! hot ) iframe . show ( ) ;
67
+ header . css ( {
68
+ borderColor : ""
69
+ } ) ;
70
+ $errors . hide ( ) ;
71
+ if ( ! hot ) iframe . show ( ) ;
63
72
} ,
64
73
ok : function ( ) {
65
74
okness . text ( "" ) ;
@@ -75,30 +84,41 @@ $(function() {
75
84
status . text ( "App updated with errors. No reload!" ) ;
76
85
okness . text ( "Errors while compiling." ) ;
77
86
$errors . text ( "\n" + stripAnsi ( errors . join ( "\n\n\n" ) ) + "\n\n" ) ;
78
- header . css ( { borderColor : "#ebcb8b" } ) ;
79
- $errors . show ( ) ; iframe . hide ( ) ;
87
+ header . css ( {
88
+ borderColor : "#ebcb8b"
89
+ } ) ;
90
+ $errors . show ( ) ;
91
+ iframe . hide ( ) ;
80
92
} ,
81
93
"proxy-error" : function ( errors ) {
82
94
status . text ( "Could not proxy to content base target!" ) ;
83
95
okness . text ( "Proxy error." ) ;
84
96
$errors . text ( "\n" + stripAnsi ( errors . join ( "\n\n\n" ) ) + "\n\n" ) ;
85
- header . css ( { borderColor : "#ebcb8b" } ) ;
86
- $errors . show ( ) ; iframe . hide ( ) ;
97
+ header . css ( {
98
+ borderColor : "#ebcb8b"
99
+ } ) ;
100
+ $errors . show ( ) ;
101
+ iframe . hide ( ) ;
87
102
} ,
88
103
close : function ( ) {
89
104
status . text ( "" ) ;
90
105
okness . text ( "Disconnected." ) ;
91
106
$errors . text ( "\n\n\n Lost connection to webpack-dev-server.\n Please restart the server to reestablish connection...\n\n\n\n" ) ;
92
- header . css ( { borderColor : "#ebcb8b" } ) ;
93
- $errors . show ( ) ; iframe . hide ( ) ;
107
+ header . css ( {
108
+ borderColor : "#ebcb8b"
109
+ } ) ;
110
+ $errors . show ( ) ;
111
+ iframe . hide ( ) ;
94
112
}
95
113
} ;
96
114
97
115
newConnection ( onSocketMsg ) ;
98
116
99
117
iframe . load ( function ( ) {
100
118
status . text ( "App ready." ) ;
101
- header . css ( { borderColor : "" } ) ;
119
+ header . css ( {
120
+ borderColor : ""
121
+ } ) ;
102
122
iframe . show ( ) ;
103
123
} ) ;
104
124
@@ -113,7 +133,9 @@ $(function() {
113
133
iframe . show ( ) ;
114
134
} else {
115
135
status . text ( "App updated. Reloading app..." ) ;
116
- header . css ( { borderColor : "#96b5b4" } ) ;
136
+ header . css ( {
137
+ borderColor : "#96b5b4"
138
+ } ) ;
117
139
try {
118
140
var old = iframe [ 0 ] . contentWindow . location + "" ;
119
141
if ( old . indexOf ( "about" ) == 0 ) old = null ;
0 commit comments