Skip to content

Commit

Permalink
workaround for ionic-angular/index, closes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Mar 3, 2016
1 parent 0b6f152 commit 21ba465
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/app.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS} from 'angular2/platform/testing/browser';
import { setBaseTestProviders } from 'angular2/testing';
import { IonicApp, Platform } from 'ionic-angular/index';
import { IonicApp, Platform } from 'ionic-angular';
import { ClickerApp } from './app';

// this needs doing _once_ for the entire test suite, hence it's here
Expand Down
2 changes: 1 addition & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { Type } from 'angular2/core';
import { App, IonicApp, Platform } from 'ionic-angular/index';
import { App, IonicApp, Platform } from 'ionic-angular';
import { ClickerList } from './pages/clickerList/clickerList';
import { Page2 } from './pages/page2/page2';

Expand Down
2 changes: 1 addition & 1 deletion app/components/clickerButton/clickerButton.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TestComponentBuilder,
} from 'angular2/testing';
import { provide } from 'angular2/core';
import { Config } from 'ionic-angular/index';
import { Config } from 'ionic-angular';
import { ClickerButton } from './clickerButton';
import { Clickers } from '../../services/clickers';
import { TestUtils } from '../../../test/testUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/components/clickerButton/clickerButton.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { Component, View } from 'angular2/core';
import { Button } from 'ionic-angular/index';
import { Button } from 'ionic-angular';
import { Clickers } from '../../services/clickers';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion app/components/clickerForm/clickerForm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function main(): void {
// Form,
// IonicApp,
// Platform,
// } from 'ionic-angular/index';
// } from 'ionic-angular';
// import { ClickerForm } from '../../../app/components/clickerForm/clickerForm';
// import { Clickers } from '../../../app/services/clickers';
// import { TestUtils } from '../../testUtils';
Expand Down
2 changes: 1 addition & 1 deletion app/components/clickerForm/clickerForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { AbstractControl, ControlGroup, FormBuilder, Validators } from 'angular2/common';
import { Component, View } from 'angular2/core';
import { Button, Icon, Item, Label, TextInput } from 'ionic-angular/index';
import { Button, Icon, Item, Label, TextInput } from 'ionic-angular';
import { Clickers } from '../../services/clickers';
import { Utils } from '../../services/utils';

Expand Down
2 changes: 1 addition & 1 deletion app/pages/clickerList/clickerList.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

import { Page, NavController } from 'ionic-angular/index';
import { Page, NavController } from 'ionic-angular';
import { Clickers } from '../../services/clickers';
import { ClickerButton } from '../../components/clickerButton/clickerButton';
import { ClickerForm } from '../../components/clickerForm/clickerForm';
Expand Down
2 changes: 1 addition & 1 deletion app/pages/page2/page2.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

import { Page } from 'ionic-angular/index';
import { Page } from 'ionic-angular';

@Page({
templateUrl: 'build/pages/page2/page2.html',
Expand Down
2 changes: 1 addition & 1 deletion app/services/clickers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { Injectable } from 'angular2/core';
import { SqlStorage } from 'ionic-angular/index';
import { SqlStorage } from 'ionic-angular';
import { Clicker } from '../models/clicker';
import { Click } from '../models/click';

Expand Down
25 changes: 25 additions & 0 deletions test/ionic-angular.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./node_modules/ionic-angular/config/bootstrap'));
__export(require('./node_modules/ionic-angular/config/config'));
__export(require('./node_modules/ionic-angular/config/directives'));
__export(require('./node_modules/ionic-angular/decorators/app'));
__export(require('./node_modules/ionic-angular/decorators/page'));
__export(require('./node_modules/ionic-angular/components'));
__export(require('./node_modules/ionic-angular/platform/platform'));
__export(require('./node_modules/ionic-angular/platform/storage'));
__export(require('./node_modules/ionic-angular/util/click-block'));
__export(require('./node_modules/ionic-angular/util/events'));
__export(require('./node_modules/ionic-angular/util/keyboard'));
__export(require('./node_modules/ionic-angular/util/form'));
__export(require('./node_modules/ionic-angular/animations/animation'));
__export(require('./node_modules/ionic-angular/transitions/transition'));
__export(require('./node_modules/ionic-angular/translation/translate'));
__export(require('./node_modules/ionic-angular/translation/translate_pipe'));
// these modules don't export anything
require('./node_modules/ionic-angular/config/modes');
require('./node_modules/ionic-angular/platform/registry');
require('./node_modules/ionic-angular/animations/builtins');
require('./node_modules/ionic-angular/transitions/transition-ios');
require('./node_modules/ionic-angular/transitions/transition-md');
2 changes: 2 additions & 0 deletions test/karma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = function(config) {
'node_modules/systemjs/dist/system.src.js',
'node_modules/reflect-metadata/Reflect.js',

{ pattern: 'test/ionic-angular.js', included: false, watched: false },
{ pattern: 'node_modules/angular2/**/*.js', included: false, watched: false },
{ pattern: 'node_modules/ionic-angular/**/*.js', included: false, watched: false },
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
Expand Down Expand Up @@ -67,6 +68,7 @@ module.exports = function(config) {
proxies: {
// allows us to keep test code separate from app code and still have the references work
'/base/node_modules/ionic-angular/decorators/app.js': '/base/www/build/test/app.stub.js', // stub out Ionic's @App decorator
'/base/ionic-angular.js': '/base/test/ionic-angular.js'
},

// level of logging
Expand Down
1 change: 0 additions & 1 deletion test/test-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ System.config({
baseURL: '/base/',
defaultJSExtensions: true,
paths: {
'ionic/*': 'node_modules/ionic-angular/*.js',
'ionic-angular/*': 'node_modules/ionic-angular/*.js',
'angular2/*': 'node_modules/angular2/*.js',
'rxjs/*': 'node_modules/rxjs/*.js'
Expand Down

0 comments on commit 21ba465

Please sign in to comment.