@@ -203,9 +203,8 @@ module.exports = function (browserify, options) {
203
203
204
204
function addHooks ( ) {
205
205
browserify . pipeline . get ( 'pack' ) . push ( through ( function write ( row , enc , next ) {
206
- next ( null , row )
206
+ next ( null , row ) ;
207
207
} , function end ( cb ) {
208
-
209
208
// on each bundle, create a new stream b/c the old one might have ended
210
209
var compiledCssStream = new ReadableStream ( ) ;
211
210
compiledCssStream . _read = function ( ) { } ;
@@ -221,7 +220,7 @@ module.exports = function (browserify, options) {
221
220
compiledCssStream . push ( css ) ;
222
221
compiledCssStream . push ( null ) ;
223
222
224
- const writes = [ ] ;
223
+ var writes = [ ] ;
225
224
226
225
// write the css file
227
226
if ( cssOutFilename ) {
@@ -234,7 +233,7 @@ module.exports = function (browserify, options) {
234
233
}
235
234
Promise . all ( writes )
236
235
. then ( function ( ) { cb ( ) ; } )
237
- . catch ( function ( err ) { self . emit ( 'error' , err ) ; cb ( ) } )
236
+ . catch ( function ( err ) { self . emit ( 'error' , err ) ; cb ( ) ; } ) ;
238
237
} ) ) ;
239
238
}
240
239
@@ -244,13 +243,11 @@ module.exports = function (browserify, options) {
244
243
return browserify ;
245
244
} ;
246
245
247
- function writeFile ( filename , content ) {
246
+ function writeFile ( filename , content ) {
248
247
return new Promise ( function ( resolve , reject ) {
249
248
fs . writeFile ( filename , content , function ( err ) {
250
- if ( err )
251
- reject ( err ) ;
252
- else
253
- resolve ( ) ;
249
+ if ( err ) reject ( err ) ;
250
+ else resolve ( ) ;
254
251
} ) ;
255
252
} ) ;
256
253
}
0 commit comments