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