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:
parent
0df8bc4e52
commit
a4ba46cb99
25
gulpfile.js
25
gulpfile.js
|
@ -1068,22 +1068,6 @@ gulp.task('!bundle.testing', ['build.js.dev'], function() {
|
|||
'./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() {
|
||||
var q = require('q');
|
||||
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'));
|
||||
});
|
||||
|
||||
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() {
|
||||
return merge2(
|
||||
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.min.deps',
|
||||
'!bundle.web_worker.js.dev.deps',
|
||||
'!bundle.js.sfx.dev.deps',
|
||||
'bundles.js.umd.min',
|
||||
'!bundle.testing',
|
||||
'!bundle.ng.polyfills'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
library angular2.sfx;
|
||||
|
||||
// empty as we don't have a version for Dart
|
|
@ -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;
|
||||
};
|
Loading…
Reference in New Issue