use system bundle for e2e

This commit is contained in:
Tim Lancina
2015-12-16 16:19:08 -06:00
parent 24b4088bfb
commit 2bc456ead4
2 changed files with 6 additions and 36 deletions

View File

@ -318,39 +318,7 @@ gulp.task('e2e.build', function() {
}
});
gulp.task('e2e.bundle', ['e2e.build', 'bundle', 'copy.web-animations', 'sass', 'fonts'], function(done) {
var glob = require('glob');
var webpack = require('webpack');
var path = require('path');
var _ = require('lodash');
return glob("dist/e2e/**/index.js", function(err, files){
var numTasks = files.length;
var callback = null;
files.forEach(function(file){
var config = require('./scripts/e2e/webpack.config.js');
// add our bundle entry, removing previous if necessary
// since config is cached
if (config.entry.length > 1) {
config.entry.pop();
}
config.entry.push('./' + file);
config.output = {
libraryTarget: 'commonjs2',
filename: path.dirname(file) + '/bundle.js'
}
if (--numTasks === 0) callback = done;
bundle({
config: config,
stats: false,
cb: callback
});
})
})
});
gulp.task('e2e', ['e2e.bundle']);
gulp.task('e2e', ['e2e.build', 'bundle.system', 'copy.web-animations', 'sass', 'fonts']);
gulp.task('sass', function() {
var sass = require('gulp-sass');

View File

@ -11,13 +11,15 @@
<script src="/node_modules/systemjs/node_modules/es6-module-loader/dist/es6-module-loader.src.js"></script>
<script src="/node_modules/systemjs/dist/system.src.js"></script>
<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="/node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="/node_modules/angular2/bundles/router.dev.js"></script>
<script src="/node_modules/angular2/bundles/http.dev.js"></script>
<script src="/dist/bundles/ionic.system.js"></script>
<script>
System.config({
map: {
'Rx': '/node_modules/rxjs/Rx.js',
'rxjs': '/node_modules/rxjs',
'angular2': '/node_modules/angular2/bundles/angular2-all.umd.js',
'ionic/ionic': '/dist/bundles/ionic.js'
}
})
</script>
@ -94,7 +96,7 @@
</ion-app>
<script>
System.import('bundle.js').then(function(m) {}, console.error.bind(console));
System.import('index.js').then(function(m) {}, console.error.bind(console));
console.timeEnd('script init');
</script>