@@ -150,7 +150,7 @@ var BENCHPRESS_BUNDLE_CONFIG = {
150150 'rx'
151151 ] ,
152152 dest : CONFIG . dest . benchpress_bundle
153- }
153+ } ;
154154
155155// ------------
156156// clean
@@ -245,6 +245,7 @@ gulp.task('build/analyze.dart', dartanalyzer(gulp, gulpPlugins, {
245245
246246// ------------
247247// pubbuild
248+ // WARNING: this task is very slow (~15m as of July 2015)
248249
249250gulp . task ( 'build/pubbuild.dart' , pubbuild ( gulp , gulpPlugins , {
250251 src : CONFIG . dest . dart ,
@@ -330,6 +331,17 @@ function jsServeDartJs() {
330331 } ) ( ) ;
331332}
332333
334+ function proxyServeDart ( ) {
335+ return jsserve ( gulp , gulpPlugins , {
336+ port : 8002 ,
337+ proxies : [
338+ { route : '/examples' , url : 'http://localhost:8004' } ,
339+ { route : '/benchmarks_external' , url : 'http://localhost:8008' } ,
340+ { route : '/benchmarks' , url : 'http://localhost:8006' }
341+ ]
342+ } ) ( ) ;
343+ }
344+
333345// ------------------
334346// web servers
335347gulp . task ( 'serve.js.dev' , [ 'build.js.dev' ] , function ( neverDone ) {
@@ -351,19 +363,33 @@ gulp.task('serve.e2e.prod', ['build.js.prod', 'build.js.cjs', 'build.css.materia
351363
352364gulp . task ( 'serve.js.dart2js' , jsServeDartJs ) ;
353365
366+ gulp . task ( '!proxyServeDart' , proxyServeDart ) ;
367+
368+ gulp . task ( 'serve.dart' , function ( done ) {
369+ runSequence ( [
370+ '!proxyServeDart' ,
371+ 'serve/examples.dart' ,
372+ 'serve/benchmarks.dart' ,
373+ 'serve/benchmarks_external.dart'
374+ ] , done ) ;
375+ } ) ;
376+
354377gulp . task ( 'serve/examples.dart' , pubserve ( gulp , gulpPlugins , {
355378 command : DART_SDK . PUB ,
356- path : CONFIG . dest . dart + '/examples'
379+ path : CONFIG . dest . dart + '/examples' ,
380+ port : 8004
357381} ) ) ;
358382
359383gulp . task ( 'serve/benchmarks.dart' , pubserve ( gulp , gulpPlugins , {
360384 command : DART_SDK . PUB ,
361- path : CONFIG . dest . dart + '/benchmarks'
385+ path : CONFIG . dest . dart + '/benchmarks' ,
386+ port : 8006
362387} ) ) ;
363388
364389gulp . task ( 'serve/benchmarks_external.dart' , pubserve ( gulp , gulpPlugins , {
365390 command : DART_SDK . PUB ,
366- path : CONFIG . dest . dart + '/benchmarks_external'
391+ path : CONFIG . dest . dart + '/benchmarks_external' ,
392+ port : 8008
367393} ) ) ;
368394
369395// --------------
@@ -751,7 +777,6 @@ gulp.task('build.dart', function(done) {
751777 'build/packages.dart' ,
752778 'build/pubspec.dart' ,
753779 'build/analyze.dart' ,
754- 'build/pubbuild.dart' ,
755780 'build.dart.material.css' ,
756781 sequenceComplete ( done )
757782 ) ;
0 commit comments