fix(bundles): remove SFX bundle

Closes #5665

BREAKING CHANGE:

The existing sfx bundle (angular2.sfx.dev.js) is replaced by UMD bundles:
angular2.umd.js and angular2.umd.dev.js. The new UMD bundles dont have
polyfills (zone.js, reflect-metadata) pre-appended. Those polyfills
can be easily loaded by including the angular-polyfills.js bundle.

Closes #5712
This commit is contained in:
Pawel Kozlowski 2015-12-08 21:47:09 +01:00 committed by Jeremy Elbourn
parent 0df8bc4e52
commit a4ba46cb99
3 changed files with 0 additions and 50 deletions

View File

@ -1068,22 +1068,6 @@ gulp.task('!bundle.testing', ['build.js.dev'], function() {
'./dist/js/bundle/testing.js', {sourceMaps: true}); './dist/js/bundle/testing.js', {sourceMaps: true});
}); });
// self-executing development build
// This bundle executes its main module - angular2_sfx, when loaded, without
// a corresponding System.import call. It is aimed at ES5 developers that do not
// use System loader polyfills (like system.js and es6 loader).
// see: https://github.com/systemjs/builder (SFX bundles).
gulp.task('!bundle.js.sfx.dev', ['build.js.dev'], function() {
var bundler = require('./tools/build/bundle');
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths = merge(true, devBundleConfig.paths, {'*': 'dist/js/dev/es5/*.js'});
return bundler.bundle(devBundleConfig, 'angular2/angular2_sfx',
'./dist/build/angular2.sfx.dev.js', {sourceMaps: true},
/* self-executing */ true);
});
gulp.task('!bundles.js.umd', ['build.js.dev'], function() { gulp.task('!bundles.js.umd', ['build.js.dev'], function() {
var q = require('q'); var q = require('q');
var webpack = q.denodeify(require('webpack')); var webpack = q.denodeify(require('webpack'));
@ -1197,14 +1181,6 @@ gulp.task('!bundle.js.dev.deps', ['!bundle.js.dev'], function() {
.pipe(gulp.dest('dist/js/bundle')); .pipe(gulp.dest('dist/js/bundle'));
}); });
gulp.task('!bundle.js.sfx.dev.deps', ['!bundle.js.sfx.dev'], function() {
var bundler = require('./tools/build/bundle');
return bundler.modify(JS_DEV_DEPS.concat(['dist/build/angular2.sfx.dev.js']),
'angular2.sfx.dev.js')
.pipe(gulp.dest('dist/js/bundle'));
});
gulp.task('!bundle.web_worker.js.dev.deps', ['!bundle.web_worker.js.dev'], function() { gulp.task('!bundle.web_worker.js.dev.deps', ['!bundle.web_worker.js.dev'], function() {
return merge2( return merge2(
addDevDependencies("web_worker/ui.dev.js", addDevDependencies("web_worker/worker.dev.js"))); addDevDependencies("web_worker/ui.dev.js", addDevDependencies("web_worker/worker.dev.js")));
@ -1226,7 +1202,6 @@ gulp.task('bundles.js',
'!bundle.js.dev.deps', '!bundle.js.dev.deps',
'!bundle.js.min.deps', '!bundle.js.min.deps',
'!bundle.web_worker.js.dev.deps', '!bundle.web_worker.js.dev.deps',
'!bundle.js.sfx.dev.deps',
'bundles.js.umd.min', 'bundles.js.umd.min',
'!bundle.testing', '!bundle.testing',
'!bundle.ng.polyfills' '!bundle.ng.polyfills'

View File

@ -1,3 +0,0 @@
library angular2.sfx;
// empty as we don't have a version for Dart

View File

@ -1,22 +0,0 @@
import * as ng from './angular2';
// the router and http should have their own SFX bundle
// But currently the module arithmetic 'angular2/router_sfx - angular2/angular2',
// is not support by system builder.
import * as router from './router';
import * as http from './http';
var _prevNg = (<any>window).ng;
(<any>window).ng = ng;
(<any>window).ngRouter = router;
(<any>window).ngHttp = http;
/**
* Calling noConflict will restore window.angular to its pre-angular loading state
* and return the angular module object.
*/
(<any>ng).noConflict = function() {
(<any>window).ng = _prevNg;
return ng;
};