@@ -252,9 +252,10 @@ gulp.task('build/check.apidocs.dart',
252252// pubbuild
253253// WARNING: this task is very slow (~15m as of July 2015)
254254
255- gulp . task ( 'build/pubbuild.dart' ,
256- pubbuild ( gulp , gulpPlugins ,
257- { src : CONFIG . dest . dart , dest : CONFIG . dest . js . dart2js , command : DART_SDK . PUB } ) ) ;
255+ gulp . task (
256+ 'build/pubbuild.dart' ,
257+ pubbuild . subdirs ( gulp , gulpPlugins ,
258+ { src : CONFIG . dest . dart , dest : CONFIG . dest . js . dart2js , command : DART_SDK . PUB } ) ) ;
258259
259260// ------------
260261// formatting
@@ -584,6 +585,30 @@ gulp.task('test.unit.dart', function(done) {
584585 } ) ;
585586} ) ;
586587
588+ // Dart Payload Size Test
589+ // This test will fail if the size of our hello_world app goes beyond one of
590+ // these values when compressed at the specified level.
591+ // Measure in bytes.
592+ var _DART_PAYLOAD_SIZE_LIMITS = { 'uncompressed' : 375 * 1024 , 'gzip level=6' : 105 * 1024 } ;
593+ gulp . task ( 'test.payload.dart/ci' , function ( done ) {
594+ runSequence ( 'build/packages.dart' , '!pubget.payload.dart' , '!pubbuild.payload.dart' ,
595+ '!checkAndReport.payload.dart' , done ) ;
596+ } ) ;
597+
598+ gulp . task ( '!pubget.payload.dart' ,
599+ pubget . dir ( gulp , gulpPlugins ,
600+ { dir : 'modules_dart/payload/hello_world' , command : DART_SDK . PUB } ) ) ;
601+
602+ gulp . task ( '!pubbuild.payload.dart' ,
603+ pubbuild . single ( gulp , gulpPlugins ,
604+ { command : DART_SDK . PUB , src : 'modules_dart/payload/hello_world' } ) ) ;
605+
606+ gulp . task ( '!checkAndReport.payload.dart' , function ( ) {
607+ var reportSize = require ( './tools/analytics/reportsize' ) ;
608+ return reportSize ( 'modules_dart/payload/hello_world/build/web/*.dart.js' ,
609+ { failConditions : _DART_PAYLOAD_SIZE_LIMITS , prefix : 'hello_world' } ) ;
610+ } ) ;
611+
587612gulp . task ( 'watch.dart.dev' , function ( done ) {
588613 runSequence ( 'build/tree.dart' , 'build/pure-packages.dart' , '!build/pubget.angular2.dart' ,
589614 '!build/change_detect.dart' , '!build/remove-pub-symlinks' , 'build.dart.material.css' ,
@@ -1053,10 +1078,9 @@ gulp.task('!bundle.copy', function() {
10531078 gulp . src ( 'dist/js/bundle/**' ) . pipe ( gulp . dest ( 'dist/js/dev/es5/bundle' ) ) ) ;
10541079} ) ;
10551080
1056- gulp . task ( '!bundles.js.checksize' , function ( ) {
1081+ gulp . task ( '!bundles.js.checksize' , function ( done ) {
10571082 var reportSize = require ( './tools/analytics/reportsize' ) ;
1058- return reportSize ( 'dist/js/bundle/**' , { printToConsole : false ,
1059- reportAnalytics : true } ) ;
1083+ return reportSize ( 'dist/js/bundle/**' , { printToConsole : [ 'gzip level=2' ] } ) ;
10601084} ) ;
10611085
10621086gulp . task ( 'bundles.js' ,
0 commit comments