diff --git a/.gitignore b/.gitignore index 0dfd66c2e0..6779cdab5f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,9 @@ UserInterfaceState.xcuserstate src/themes/version.scss scripts/e2e/webpackEntryPoints.json scripts/build/e2e-generated-tsconfig.json -*.css.ts \ No newline at end of file +*.css.ts + +# demo stuff +demos/node_modules +demos/src/**/*.js +demos/src/**/*.ngfactory.ts diff --git a/demos/src/events/app.module.ts b/demos/src/events/app.module.ts index a291ef08d7..3f2a8e0830 100644 --- a/demos/src/events/app.module.ts +++ b/demos/src/events/app.module.ts @@ -1,18 +1,20 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage } from './app.component'; +import { ApiDemoApp, Login, Logout } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage + Login, + Logout ], imports: [ IonicModule.forRoot(ApiDemoApp) ], bootstrap: [IonicApp], entryComponents: [ - ApiDemoPage + Login, + Logout ] }) export class AppModule {} diff --git a/demos/src/loading/app.component.ts b/demos/src/loading/app.component.ts index a18f97caa1..b3f01e151b 100644 --- a/demos/src/loading/app.component.ts +++ b/demos/src/loading/app.component.ts @@ -2,7 +2,7 @@ import { Component, ViewEncapsulation } from '@angular/core'; import { LoadingController, NavController } from 'ionic-angular'; @Component({ - templateUrl: 'main.html' + templateUrl: 'page.html' }) export class Page1 { constructor(public loadingCtrl: LoadingController, public navCtrl: NavController) {} diff --git a/demos/src/loading/app.module.ts b/demos/src/loading/app.module.ts index a291ef08d7..a5498c5378 100644 --- a/demos/src/loading/app.module.ts +++ b/demos/src/loading/app.module.ts @@ -1,18 +1,20 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage } from './app.component'; +import { ApiDemoApp, Page1, Page2 } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage + Page1, + Page2 ], imports: [ IonicModule.forRoot(ApiDemoApp) ], bootstrap: [IonicApp], entryComponents: [ - ApiDemoPage + Page1, + Page2 ] }) export class AppModule {} diff --git a/demos/src/modal/app.module.ts b/demos/src/modal/app.module.ts index a291ef08d7..1e873bf41c 100644 --- a/demos/src/modal/app.module.ts +++ b/demos/src/modal/app.module.ts @@ -1,18 +1,20 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage } from './app.component'; +import { ApiDemoApp, ModalContentPage, ModalFirstPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage + ModalFirstPage, + ModalContentPage ], imports: [ IonicModule.forRoot(ApiDemoApp) ], bootstrap: [IonicApp], entryComponents: [ - ApiDemoPage + ModalFirstPage, + ModalContentPage ] }) export class AppModule {} diff --git a/demos/src/textarea/app.module.ts b/demos/src/textarea/app.module.ts index 0d00ef6563..389df905ce 100644 --- a/demos/src/textarea/app.module.ts +++ b/demos/src/textarea/app.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component'; +import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage, - TabPage + ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) diff --git a/demos/src/title/app.module.ts b/demos/src/title/app.module.ts index 0d00ef6563..389df905ce 100644 --- a/demos/src/title/app.module.ts +++ b/demos/src/title/app.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component'; +import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage, - TabPage + ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) diff --git a/demos/src/toast/app.module.ts b/demos/src/toast/app.module.ts index 0d00ef6563..389df905ce 100644 --- a/demos/src/toast/app.module.ts +++ b/demos/src/toast/app.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component'; +import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage, - TabPage + ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) diff --git a/demos/src/toggle/app.module.ts b/demos/src/toggle/app.module.ts index 0d00ef6563..389df905ce 100644 --- a/demos/src/toggle/app.module.ts +++ b/demos/src/toggle/app.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component'; +import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage, - TabPage + ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) diff --git a/demos/src/toolbar/app.module.ts b/demos/src/toolbar/app.module.ts index 0d00ef6563..389df905ce 100644 --- a/demos/src/toolbar/app.module.ts +++ b/demos/src/toolbar/app.module.ts @@ -1,12 +1,11 @@ import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; -import { ApiDemoApp, ApiDemoPage, TabPage } from './app.component'; +import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, - ApiDemoPage, - TabPage + ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) diff --git a/demos/tsconfig.json b/demos/tsconfig.json new file mode 100644 index 0000000000..9bf05ec5ca --- /dev/null +++ b/demos/tsconfig.json @@ -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 + } +} \ No newline at end of file diff --git a/scripts/gulp/constants.ts b/scripts/gulp/constants.ts index c9e4438f9b..3a09707550 100644 --- a/scripts/gulp/constants.ts +++ b/scripts/gulp/constants.ts @@ -4,6 +4,7 @@ import { join } from 'path'; // Names export const COMPONENTS_NAME = 'components'; export const DIST_NAME = 'dist'; +export const DEMOS_NAME = 'demos'; export const E2E_NAME = 'e2e'; export const PACKAGE_NAME = 'ionic-angular'; export const SCRIPTS_NAME = 'scripts'; @@ -17,6 +18,8 @@ export const ES_MODULE = 'es2015'; // File Paths 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_E2E_ROOT = join(DIST_ROOT, E2E_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 SCRIPTS_ROOT = join(PROJECT_ROOT, SCRIPTS_NAME); export const SRC_ROOT = join(PROJECT_ROOT, SRC_NAME); + export const SRC_COMPONENTS_ROOT = join(SRC_ROOT, COMPONENTS_NAME); diff --git a/scripts/gulp/tasks/demos.ts b/scripts/gulp/tasks/demos.ts index e69de29bb2..50d950a38a 100644 --- a/scripts/gulp/tasks/demos.ts +++ b/scripts/gulp/tasks/demos.ts @@ -0,0 +1,5 @@ + + +function runNgc() { + +} \ No newline at end of file diff --git a/scripts/gulp/tasks/e2e.ts b/scripts/gulp/tasks/e2e.ts index 06734f80b2..a24fd27ad8 100644 --- a/scripts/gulp/tasks/e2e.ts +++ b/scripts/gulp/tasks/e2e.ts @@ -5,8 +5,6 @@ import * as fs from 'fs'; import { compileSass, copyFonts, createTempTsConfig, deleteFiles, runNgc, runWebpack, setSassIonicVersion, createTimestamp } from '../util'; - - task('e2e', e2eBuild); function e2eBuild(done: Function) {