mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
remove init.js, users must explicitly call System.import
This commit is contained in:
@ -39,7 +39,6 @@ var tscOptions = {
|
||||
target: 'ES6',
|
||||
allowNonTsExtensions: true,
|
||||
isolatedModules: true,
|
||||
//declaration: true, //generate d.ts files
|
||||
emitDecoratorMetadata: true,
|
||||
experimentalDecorators: true,
|
||||
noEmitOnError: false, // ignore errors
|
||||
@ -123,7 +122,6 @@ function transpile(moduleType) {
|
||||
'ionic/**/*.js',
|
||||
'!ionic/components/*/test/**/*',
|
||||
'!ionic/util/hairline.js',
|
||||
'!ionic/init.js',
|
||||
'!ionic/util/test/*'
|
||||
])
|
||||
.pipe(cache('transpile', { optimizeMemory: true }))
|
||||
@ -147,7 +145,7 @@ gulp.task('transpile.common', function() { return transpile("common"); });
|
||||
gulp.task('transpile', ['transpile.system']);
|
||||
|
||||
gulp.task('bundle.js', function() {
|
||||
return gulp.src(['dist/js/es5/system/ionic/**/*.js', 'ionic/util/hairline.js', 'ionic/init.js'])
|
||||
return gulp.src(['dist/js/es5/system/ionic/**/*.js', 'ionic/util/hairline.js'])
|
||||
.pipe(concat('ionic.bundle.js'))
|
||||
.pipe(gulp.dest('dist/js/'));
|
||||
});
|
||||
|
@ -1,17 +0,0 @@
|
||||
|
||||
(function(document){
|
||||
|
||||
var ionicImport = System.import('ionic/components/app/app');
|
||||
|
||||
function importApp(module) {
|
||||
if (module) {
|
||||
System.import(module);
|
||||
}
|
||||
}
|
||||
|
||||
var ele = document.querySelectorAll('[module]');
|
||||
for (var i = 0; i < ele.length; i++) {
|
||||
importApp(ele[i].getAttribute('module'));
|
||||
}
|
||||
|
||||
})(document);
|
@ -35,7 +35,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ion-app module="{{MODULE}}">
|
||||
<ion-app>
|
||||
<ion-loading-icon></ion-loading-icon>
|
||||
</ion-app>
|
||||
|
||||
@ -55,6 +55,7 @@
|
||||
|
||||
<!-- web animations polyfill for non-chrome browsers -->
|
||||
<script src="../../../lib/web-animations.min.js"></script>
|
||||
<script>System.import("{{MODULE}}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user