@@ -252,9 +252,10 @@ gulp.task('build/check.apidocs.dart',
252
252
// pubbuild
253
253
// WARNING: this task is very slow (~15m as of July 2015)
254
254
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 } ) ) ;
258
259
259
260
// ------------
260
261
// formatting
@@ -584,6 +585,30 @@ gulp.task('test.unit.dart', function(done) {
584
585
} ) ;
585
586
} ) ;
586
587
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
+
587
612
gulp . task ( 'watch.dart.dev' , function ( done ) {
588
613
runSequence ( 'build/tree.dart' , 'build/pure-packages.dart' , '!build/pubget.angular2.dart' ,
589
614
'!build/change_detect.dart' , '!build/remove-pub-symlinks' , 'build.dart.material.css' ,
@@ -1053,10 +1078,9 @@ gulp.task('!bundle.copy', function() {
1053
1078
gulp . src ( 'dist/js/bundle/**' ) . pipe ( gulp . dest ( 'dist/js/dev/es5/bundle' ) ) ) ;
1054
1079
} ) ;
1055
1080
1056
- gulp . task ( '!bundles.js.checksize' , function ( ) {
1081
+ gulp . task ( '!bundles.js.checksize' , function ( done ) {
1057
1082
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' ] } ) ;
1060
1084
} ) ;
1061
1085
1062
1086
gulp . task ( 'bundles.js' ,
0 commit comments