Permalink
Browse files
Revert "Build: Turn on mangling with Uglify" (#11005)
- Loading branch information...
Showing
with
10 additions
and
18 deletions.
-
+10
−18
server/bundler/bin/bundler.js
|
|
@@ -40,26 +40,18 @@ function minify( files ) { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
- console.log( ' minifying ' + file );
|
|
|
-
|
|
|
- child = cp.spawnSync(
|
|
|
- path.join( 'node_modules', '.bin', 'uglifyjs' ),
|
|
|
- [
|
|
|
- file,
|
|
|
- '-m',
|
|
|
- '-c',
|
|
|
- '-o', file.replace( '.js', '.min.js' )
|
|
|
- ]
|
|
|
- );
|
|
|
+ child = cp.spawn( path.join( 'node_modules', '.bin', 'uglifyjs' ), [ '--output', file.replace( '.js', '.min.js' ), file ] );
|
|
|
|
|
|
- if ( child.status != 0 ) {
|
|
|
- console.error( ' error minifying ' + file );
|
|
|
- console.dir( child );
|
|
|
- }
|
|
|
- } );
|
|
|
+ _children.push( child );
|
|
|
|
|
|
- console.log( 'Minification of all bundles completed.' );
|
|
|
- console.log( 'Total build time: ' + ( new Date().getTime() - start ) + 'ms' );
|
|
|
+ child.once( 'exit', function() {
|
|
|
+ _children.splice( _children.indexOf( child ), 1 );
|
|
|
+ if ( _children.length === 0 ) {
|
|
|
+ console.log( 'Minification of all bundles completed.' );
|
|
|
+ console.log( 'Total build time: ' + ( new Date().getTime() - start ) + 'ms' );
|
|
|
+ }
|
|
|
+ } );
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
Error.stackTrackLimit = 30;
|
|
|
|
0 comments on commit
223de5a