mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(e2e): rename app-module.ts to app.module.ts for consistency
references #10023
This commit is contained in:
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
System.import('@angular/platform-browser-dynamic').then(function(platformBrowserDynamic) {
|
System.import('@angular/platform-browser-dynamic').then(function(platformBrowserDynamic) {
|
||||||
System.import('app-module.js').then(function(appModule) {
|
System.import('app.module.js').then(function(appModule) {
|
||||||
platformBrowserDynamic.platformBrowserDynamic().bootstrapModule(appModule.AppModule);
|
platformBrowserDynamic.platformBrowserDynamic().bootstrapModule(appModule.AppModule);
|
||||||
}, console.error.bind(console));
|
}, console.error.bind(console));
|
||||||
}, console.error.bind(console));
|
}, console.error.bind(console));
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { platformBrowser } from '@angular/platform-browser';
|
import { platformBrowser } from '@angular/platform-browser';
|
||||||
import { AppModuleNgFactory } from './app-module.ngfactory';
|
import { AppModuleNgFactory } from './app.module.ngfactory';
|
||||||
|
|
||||||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
||||||
|
@ -59,7 +59,7 @@ task('e2e.build', function () {
|
|||||||
.on('error', function (error) {
|
.on('error', function (error) {
|
||||||
console.log(error.message);
|
console.log(error.message);
|
||||||
})
|
})
|
||||||
.pipe(gulpif(/app-module.js$/, createIndexHTML()))
|
.pipe(gulpif(/app.module.js$/, createIndexHTML()))
|
||||||
.pipe(gulpif(/e2e.js$/, createPlatformTests()));
|
.pipe(gulpif(/e2e.js$/, createPlatformTests()));
|
||||||
|
|
||||||
var testFiles = src([
|
var testFiles = src([
|
||||||
|
@ -36,7 +36,7 @@ task('e2e.copySource', (done: Function) => {
|
|||||||
const buildConfig = require('../../build/config');
|
const buildConfig = require('../../build/config');
|
||||||
|
|
||||||
const stream = src([`${SRC_ROOT}/**/*`, `!${SRC_ROOT}/**/*.spec.ts`])
|
const stream = src([`${SRC_ROOT}/**/*`, `!${SRC_ROOT}/**/*.spec.ts`])
|
||||||
.pipe(gulpif(/app-module.ts$/, createIndexHTML()))
|
.pipe(gulpif(/app.module.ts$/, createIndexHTML()))
|
||||||
.pipe(gulpif(/e2e.ts$/, createPlatformTests()))
|
.pipe(gulpif(/e2e.ts$/, createPlatformTests()))
|
||||||
.pipe(dest(DIST_E2E_ROOT));
|
.pipe(dest(DIST_E2E_ROOT));
|
||||||
|
|
||||||
@ -101,10 +101,10 @@ task('e2e.compileTests', (done: Function) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function buildE2ETests(folderInfo: any, done: Function) {
|
function buildE2ETests(folderInfo: any, done: Function) {
|
||||||
let includeGlob = ['./components/*/test/*/app-module.ts', './components/*/test/*/entry.ts'];
|
let includeGlob = ['./components/*/test/*/app.module.ts', './components/*/test/*/entry.ts'];
|
||||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||||
includeGlob = [
|
includeGlob = [
|
||||||
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/app-module.ts`,
|
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/app.module.ts`,
|
||||||
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/entry.ts`,
|
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/entry.ts`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ task('e2e.watchProd', ['e2e.copyExternalDependencies', 'e2e.sass', 'e2e.fonts'],
|
|||||||
let e2eTestPath = SRC_COMPONENTS_ROOT;
|
let e2eTestPath = SRC_COMPONENTS_ROOT;
|
||||||
|
|
||||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||||
e2eTestPath = join(SRC_COMPONENTS_ROOT, folderInfo.componentName, 'test', folderInfo.componentTest, 'app-module.ts');
|
e2eTestPath = join(SRC_COMPONENTS_ROOT, folderInfo.componentName, 'test', folderInfo.componentTest, 'app.module.ts');
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
import { Component, NgModule } from '@angular/core';
|
|
||||||
import { IonicApp, IonicModule } from '../../../..';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
templateUrl: 'main.html'
|
|
||||||
})
|
|
||||||
export class E2EPage {
|
|
||||||
homeIcon = 'home';
|
|
||||||
isActive = false;
|
|
||||||
iconIndex = 0;
|
|
||||||
icons = [
|
|
||||||
'home',
|
|
||||||
'star',
|
|
||||||
'ios-alert',
|
|
||||||
'ios-alert-outline',
|
|
||||||
'md-alert',
|
|
||||||
'logo-apple'
|
|
||||||
];
|
|
||||||
btnIcon: string;
|
|
||||||
dynamicColor: string = 'danger';
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
this.btnIcon = this.icons[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
updateIcon() {
|
|
||||||
this.iconIndex++;
|
|
||||||
if (this.iconIndex >= this.icons.length) {
|
|
||||||
this.iconIndex = 0;
|
|
||||||
}
|
|
||||||
this.btnIcon = this.icons[this.iconIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
|
||||||
})
|
|
||||||
export class E2EApp {
|
|
||||||
rootPage = E2EPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
E2EApp,
|
|
||||||
E2EPage
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
IonicModule.forRoot(E2EApp)
|
|
||||||
],
|
|
||||||
bootstrap: [IonicApp],
|
|
||||||
entryComponents: [
|
|
||||||
E2EPage
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class AppModule {}
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user