mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(demos): update gitignore, clean up app.module.ts build errors
update gitignore, clean up app.module.ts build errors
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@ -28,3 +28,8 @@ src/themes/version.scss
|
|||||||
scripts/e2e/webpackEntryPoints.json
|
scripts/e2e/webpackEntryPoints.json
|
||||||
scripts/build/e2e-generated-tsconfig.json
|
scripts/build/e2e-generated-tsconfig.json
|
||||||
*.css.ts
|
*.css.ts
|
||||||
|
|
||||||
|
# demo stuff
|
||||||
|
demos/node_modules
|
||||||
|
demos/src/**/*.js
|
||||||
|
demos/src/**/*.ngfactory.ts
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
import { ApiDemoApp, Login, Logout } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage
|
Login,
|
||||||
|
Logout
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
],
|
],
|
||||||
bootstrap: [IonicApp],
|
bootstrap: [IonicApp],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ApiDemoPage
|
Login,
|
||||||
|
Logout
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
@ -2,7 +2,7 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|||||||
import { LoadingController, NavController } from 'ionic-angular';
|
import { LoadingController, NavController } from 'ionic-angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'page.html'
|
||||||
})
|
})
|
||||||
export class Page1 {
|
export class Page1 {
|
||||||
constructor(public loadingCtrl: LoadingController, public navCtrl: NavController) {}
|
constructor(public loadingCtrl: LoadingController, public navCtrl: NavController) {}
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
import { ApiDemoApp, Page1, Page2 } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage
|
Page1,
|
||||||
|
Page2
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
],
|
],
|
||||||
bootstrap: [IonicApp],
|
bootstrap: [IonicApp],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ApiDemoPage
|
Page1,
|
||||||
|
Page2
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
import { ApiDemoApp, ModalContentPage, ModalFirstPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage
|
ModalFirstPage,
|
||||||
|
ModalContentPage
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
],
|
],
|
||||||
bootstrap: [IonicApp],
|
bootstrap: [IonicApp],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ApiDemoPage
|
ModalFirstPage,
|
||||||
|
ModalContentPage
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component';
|
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage,
|
ApiDemoPage
|
||||||
TabPage
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component';
|
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage,
|
ApiDemoPage
|
||||||
TabPage
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component';
|
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage,
|
ApiDemoPage
|
||||||
TabPage
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component';
|
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage,
|
ApiDemoPage
|
||||||
TabPage
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicApp, IonicModule } from 'ionic-angular';
|
import { IonicApp, IonicModule } from 'ionic-angular';
|
||||||
import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component';
|
import { ApiDemoApp, ApiDemoPage } from './app.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ApiDemoApp,
|
ApiDemoApp,
|
||||||
ApiDemoPage,
|
ApiDemoPage
|
||||||
TabPage
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule.forRoot(ApiDemoApp)
|
IonicModule.forRoot(ApiDemoApp)
|
||||||
|
24
demos/tsconfig.json
Normal file
24
demos/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowUnreachableCode": false,
|
||||||
|
"declaration": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"lib": ["dom", "es2015"],
|
||||||
|
"module": "es2015",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"removeComments": true,
|
||||||
|
"target": "es6",
|
||||||
|
"types": ["jasmine", "protractor"]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./src/**/app.module.ts",
|
||||||
|
"./src/**/main.ts"
|
||||||
|
],
|
||||||
|
"compileOnSave": false,
|
||||||
|
"buildOnSave": false,
|
||||||
|
"atom": {
|
||||||
|
"rewriteTsconfig": false
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ import { join } from 'path';
|
|||||||
// Names
|
// Names
|
||||||
export const COMPONENTS_NAME = 'components';
|
export const COMPONENTS_NAME = 'components';
|
||||||
export const DIST_NAME = 'dist';
|
export const DIST_NAME = 'dist';
|
||||||
|
export const DEMOS_NAME = 'demos';
|
||||||
export const E2E_NAME = 'e2e';
|
export const E2E_NAME = 'e2e';
|
||||||
export const PACKAGE_NAME = 'ionic-angular';
|
export const PACKAGE_NAME = 'ionic-angular';
|
||||||
export const SCRIPTS_NAME = 'scripts';
|
export const SCRIPTS_NAME = 'scripts';
|
||||||
@ -17,6 +18,8 @@ export const ES_MODULE = 'es2015';
|
|||||||
|
|
||||||
// File Paths
|
// File Paths
|
||||||
export const PROJECT_ROOT = join(__dirname, '../..');
|
export const PROJECT_ROOT = join(__dirname, '../..');
|
||||||
|
export const DEMOS_ROOT = join(PROJECT_ROOT, DEMOS_NAME);
|
||||||
|
export const DEMOS_SRC_ROOT = join(DEMOS_ROOT, SRC_NAME);
|
||||||
export const DIST_ROOT = join(PROJECT_ROOT, DIST_NAME);
|
export const DIST_ROOT = join(PROJECT_ROOT, DIST_NAME);
|
||||||
export const DIST_E2E_ROOT = join(DIST_ROOT, E2E_NAME);
|
export const DIST_E2E_ROOT = join(DIST_ROOT, E2E_NAME);
|
||||||
export const DIST_E2E_COMPONENTS_ROOT = join(DIST_E2E_ROOT, COMPONENTS_NAME);
|
export const DIST_E2E_COMPONENTS_ROOT = join(DIST_E2E_ROOT, COMPONENTS_NAME);
|
||||||
@ -26,6 +29,7 @@ export const DIST_VENDOR_ROOT = join(DIST_ROOT, VENDOR_NAME);
|
|||||||
export const NODE_MODULES_ROOT = join(PROJECT_ROOT, NODE_MODULES);
|
export const NODE_MODULES_ROOT = join(PROJECT_ROOT, NODE_MODULES);
|
||||||
export const SCRIPTS_ROOT = join(PROJECT_ROOT, SCRIPTS_NAME);
|
export const SCRIPTS_ROOT = join(PROJECT_ROOT, SCRIPTS_NAME);
|
||||||
export const SRC_ROOT = join(PROJECT_ROOT, SRC_NAME);
|
export const SRC_ROOT = join(PROJECT_ROOT, SRC_NAME);
|
||||||
|
|
||||||
export const SRC_COMPONENTS_ROOT = join(SRC_ROOT, COMPONENTS_NAME);
|
export const SRC_COMPONENTS_ROOT = join(SRC_ROOT, COMPONENTS_NAME);
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function runNgc() {
|
||||||
|
|
||||||
|
}
|
@ -5,8 +5,6 @@ import * as fs from 'fs';
|
|||||||
|
|
||||||
import { compileSass, copyFonts, createTempTsConfig, deleteFiles, runNgc, runWebpack, setSassIonicVersion, createTimestamp } from '../util';
|
import { compileSass, copyFonts, createTempTsConfig, deleteFiles, runNgc, runWebpack, setSassIonicVersion, createTimestamp } from '../util';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
task('e2e', e2eBuild);
|
task('e2e', e2eBuild);
|
||||||
|
|
||||||
function e2eBuild(done: Function) {
|
function e2eBuild(done: Function) {
|
||||||
|
Reference in New Issue
Block a user