Permalink
Browse files

Revert "Build: Turn on mangling with Uglify" (#11005)

  • Loading branch information...
1 parent 4330ebb commit 223de5a52a2fc4c9af75b3192de9f0c2314d340d @blowery blowery committed on GitHub Jan 27, 2017
Showing with 10 additions and 18 deletions.
  1. +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

Please sign in to comment.