diff --git a/gulpfile.js b/gulpfile.js index 6d2b0aaa0b..1415c67128 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -369,7 +369,7 @@ function proxyServeDart() { // ------------------ // web servers -gulp.task('serve.js.dev', ['build.js'], function(neverDone) { +gulp.task('serve.js.dev', ['build.js.dev'], function(neverDone) { var watch = require('./tools/build/watch'); watch('modules/**', {ignoreInitial: true}, '!broccoli.js.dev'); @@ -980,15 +980,19 @@ gulp.task('!build.tools', function() { gulp.task('broccoli.js.dev', ['build.tools'], function(done) { runSequence('!broccoli.js.dev', sequenceComplete(done)); }); -gulp.task( - '!broccoli.js.dev', - () => angularBuilder.rebuildBrowserDevTree( - {generateEs6: generateEs6, projects: cliArgsProjects, noTypeChecks: cliArgs.noTypeChecks})); +gulp.task('!broccoli.js.dev', () => angularBuilder.rebuildBrowserDevTree({ + generateEs6: generateEs6, + projects: cliArgsProjects, + noTypeChecks: cliArgs.noTypeChecks, + useBundles: cliArgs.useBundles +})); -gulp.task( - '!broccoli.js.prod', - () => angularBuilder.rebuildBrowserProdTree( - {generateEs6: generateEs6, projects: cliArgsProjects, noTypeChecks: cliArgs.noTypeChecks})); +gulp.task('!broccoli.js.prod', () => angularBuilder.rebuildBrowserProdTree({ + generateEs6: generateEs6, + projects: cliArgsProjects, + noTypeChecks: cliArgs.noTypeChecks, + useBundles: cliArgs.useBundles +})); gulp.task('build.js.dev', ['build/clean.js'], function(done) { runSequence('broccoli.js.dev', 'build.css.material', sequenceComplete(done)); @@ -1011,9 +1015,12 @@ var firstBuildJsCjs = true; * private task */ gulp.task('!build.js.cjs', function() { - return angularBuilder - .rebuildNodeTree( - {generateEs6: generateEs6, projects: cliArgsProjects, noTypeChecks: cliArgs.noTypeChecks}) + return angularBuilder.rebuildNodeTree({ + generateEs6: generateEs6, + projects: cliArgsProjects, + noTypeChecks: cliArgs.noTypeChecks, + useBundles: cliArgs.useBundles + }) .then(function() { if (firstBuildJsCjs) { firstBuildJsCjs = false; diff --git a/scripts/ci/build_js.sh b/scripts/ci/build_js.sh index 7e9d7ff737..78d5b59393 100755 --- a/scripts/ci/build_js.sh +++ b/scripts/ci/build_js.sh @@ -8,4 +8,4 @@ SCRIPT_DIR=$(dirname $0) source $SCRIPT_DIR/env_dart.sh cd $SCRIPT_DIR/../.. -node --max-old-space-size=2000 ./node_modules/.bin/gulp build.js \ No newline at end of file +node --max-old-space-size=2000 ./node_modules/.bin/gulp build.js --useBundles diff --git a/tools/broccoli/angular_builder.ts b/tools/broccoli/angular_builder.ts index 66a857b6d0..032278a9d0 100644 --- a/tools/broccoli/angular_builder.ts +++ b/tools/broccoli/angular_builder.ts @@ -15,6 +15,7 @@ type Options = { projects: ProjectMap; noTypeChecks: boolean; generateEs6: boolean; +useBundles: boolean; } ; @@ -73,7 +74,8 @@ export class AngularBuilder { sourceMaps: true, projects: opts.projects, noTypeChecks: opts.noTypeChecks, - generateEs6: opts.generateEs6 + generateEs6: opts.generateEs6, + useBundles: opts.useBundles }, path.join(this.outputPath, 'js', 'dev')); return new broccoli.Builder(tree); @@ -88,7 +90,8 @@ export class AngularBuilder { sourceMaps: false, projects: opts.projects, noTypeChecks: opts.noTypeChecks, - generateEs6: opts.generateEs6 + generateEs6: opts.generateEs6, + useBundles: opts.useBundles }, path.join(this.outputPath, 'js', 'prod')); return new broccoli.Builder(tree); diff --git a/tools/broccoli/html-replace/SCRIPTS.html b/tools/broccoli/html-replace/SCRIPTS.html index 6f7bea55fb..2195c9ac9e 100644 --- a/tools/broccoli/html-replace/SCRIPTS.html +++ b/tools/broccoli/html-replace/SCRIPTS.html @@ -1,26 +1,48 @@ - - - - - - - -