Skip to content

Commit

Permalink
update to ionic rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Dec 21, 2016
1 parent 645e45d commit b27aade
Show file tree
Hide file tree
Showing 21 changed files with 112 additions and 97 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="2.5.0"></a>
# 2.5.0 (2016-12-22)

### Features

* **Update**: Update to Ionic RC4 ([](https://github.com/lathonez/clicker/commit/))

<a name="2.4.0"></a>

# 2.4.0 (2016-12-08)
Expand Down
20 changes: 17 additions & 3 deletions angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"project": {
"version": "1.0.0-beta.16",
"version": "1.0.0-beta.22-1",
"name": "clicker"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "assets",
"assets": [
"assets"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
Expand Down Expand Up @@ -39,6 +41,18 @@
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
10 changes: 5 additions & 5 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
<plugin name="cordova-plugin-console" spec="~1.0.4"/>
<plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
<plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
<plugin name="cordova-plugin-device" spec="~1.1.4"/>
<plugin name="cordova-plugin-console" spec="~1.0.5"/>
<plugin name="cordova-plugin-whitelist" spec="~1.3.1"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
<plugin name="cordova-plugin-statusbar" spec="~2.2.1"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
</widget>
12 changes: 7 additions & 5 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ module.exports = function (config) {
preprocessors: {
'./src/test.ts': ['angular-cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
Expand All @@ -28,15 +31,14 @@ module.exports = function (config) {
config: './angular-cli.json',
environment: 'dev'
},
reporters: [
'mocha', 'karma-remap-istanbul'
],
reporters: config.angularCli && config.angularCli.codeCoverage
? ['mocha', 'karma-remap-istanbul']
: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
mime: { 'text/x-typescript': ['ts', 'tsx'] } // https://github.com/lathonez/clicker/issues/178
singleRun: false
});
};
57 changes: 26 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,50 @@
"homepage": "https://github.com/lathonez/clicker",
"private": true,
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve",
"e2e": "protractor",
"postinstall": "ionic state restore && webdriver-manager update",
"start": "ionic serve",
"test": "ng test --code-coverage"
},
"version": "2.4.0",
"version": "2.5.0",
"dependencies": {
"@angular/common": "2.1.1",
"@angular/compiler": "2.1.1",
"@angular/compiler-cli": "2.1.1",
"@angular/core": "2.1.1",
"@angular/forms": "2.1.1",
"@angular/http": "2.1.1",
"@angular/platform-browser": "2.1.1",
"@angular/platform-browser-dynamic": "2.1.1",
"@angular/platform-server": "2.1.1",
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.6",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "2.2.3",
"ionic-angular": "2.0.0-rc.4",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.45",
"@types/jasmine": "2.5.37",
"angular-cli": "1.0.0-beta.20-1",
"codelyzer": "~0.0.26",
"@ionic/app-scripts": "0.0.47",
"@types/jasmine": "2.5.38",
"@types/node": "6.0.42",
"angular-cli": "1.0.0-beta.24",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.7.0",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-jasmine": "1.0.2",
"karma-mocha-reporter": "2.2.0",
"karma-remap-istanbul": "0.2.1",
"protractor": "4.0.10",
"karma-jasmine": "1.1.0",
"karma-mocha-reporter": "2.2.1",
"karma-remap-istanbul": "0.2.2",
"protractor": "4.0.13",
"protractor-jasmine2-screenshot-reporter": "0.3.2",
"ts-node": "1.6.1",
"tslint": "3.15.1",
"tslint-eslint-rules": "2.1.0",
"typescript": "2.0.7"
"ts-node": "1.7.2",
"tslint": "4.1.1",
"tslint-eslint-rules": "3.2.0",
"typescript": "2.1.4"
},
"description": "Clicker: An Ionic project",
"cordovaPlugins": [
Expand Down
Binary file added resources/ios/icon/icon-40@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/ios/icon/icon-83.5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component, ViewChild } from '@angular/core';
import { Platform, MenuController, Nav } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { ClickerList, Page2 } from '../pages';
import { environment } from '../environments/environment';

@Component({
templateUrl: 'app.html',
templateUrl: './app.html',
})
export class ClickerApp {

Expand Down Expand Up @@ -34,9 +35,8 @@ export class ClickerApp {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.

// https://github.com/lathonez/clicker/issues/148#issuecomment-254436635
// StatusBar.styleDefault();
StatusBar.styleDefault();
Splashscreen.hide();
console.log('production: ' + environment.production);
});
}
Expand Down
16 changes: 10 additions & 6 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { ClickerApp } from './app.component';
import { ClickerList, PagesModule, Page2 } from '../pages';
import { ClickersService, StorageService } from '../services';
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { ClickerApp } from './app.component';
import { ClickerList, PagesModule, Page2 } from '../pages';
import { ClickersService, StorageService } from '../services';

@NgModule({
declarations: [
Expand All @@ -18,7 +18,11 @@ import { ClickersService, StorageService } from '../services';
ClickerList,
Page2,
],
providers: [ ClickersService, StorageService ],
providers: [
{provide: ErrorHandler, useClass: IonicErrorHandler},
ClickersService,
StorageService,
],
})

export class AppModule {}
7 changes: 0 additions & 7 deletions src/app/main.prod.ts

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/clickerButton/clickerButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Clicker } from '../../models';

@Component({
selector: 'clicker-button',
templateUrl: 'clickerButton.html',
templateUrl: './clickerButton.html',
})

export class ClickerButton {
Expand Down
2 changes: 1 addition & 1 deletion src/components/clickerForm/clickerForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ClickersService } from '../../services';

@Component({
selector: 'clicker-form',
templateUrl: 'clickerForm.html',
templateUrl: './clickerForm.html',
})

export class ClickerForm {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/clickerList/clickerList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NavController } from 'ionic-angular';
import { ClickersService } from '../../services';

@Component({
templateUrl: 'clickerList.html',
templateUrl: './clickerList.html',
})

export class ClickerList {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/page2/page2.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { App, MenuController, NavController, Platform, Config, Keyboard, Form, IonicModule } from 'ionic-angular';
import { App, Config, Form, IonicModule, Keyboard, DomController, MenuController, NavController, Platform } from 'ionic-angular';
import { ConfigMock } from '../../mocks';
import { Page2 } from './page2';

Expand All @@ -15,7 +15,7 @@ describe('Pages: Page2', () => {
TestBed.configureTestingModule({
declarations: [Page2],
providers: [
App, Platform, Form, Keyboard, MenuController, NavController,
App, DomController, Form, Keyboard, MenuController, NavController, Platform,
{provide: Config, useClass: ConfigMock},
],
imports: [
Expand Down
2 changes: 1 addition & 1 deletion src/pages/page2/page2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Component } from '@angular/core';

@Component({
templateUrl: 'page2.html',
templateUrl: './page2.html',
})

export class Page2 {
Expand Down
2 changes: 1 addition & 1 deletion src/services/clickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ClickersService {
}

// as init is async separate logic here so it's testable
private init(): Promise<void> {
private init(): Promise<{}> {
return this.initIds()
.then((ids: Array<string>) => { this.ids = ids; })
.then(() => this.initClickers(this.ids))
Expand Down
39 changes: 18 additions & 21 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';

import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TestBed } from '@angular/core/testing';
import { App, MenuController, NavController, Platform, Config, Keyboard, Form, IonicModule } from 'ionic-angular';
import { getTestBed, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { App, Config, Form, IonicModule, Keyboard, DomController, MenuController, NavController, Platform } from 'ionic-angular';
import { ConfigMock } from './mocks';
import { ClickersServiceMock } from './services/clickers.mock';
import { ClickersService } from './services';
Expand All @@ -19,25 +20,21 @@ declare var __karma__: any;
declare var require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function (): any { /* no op */};
__karma__.loaded = function (): void {
// noop
};

Promise.all([
System.import('@angular/core/testing'),
System.import('@angular/platform-browser-dynamic/testing'),
])
// First, initialize the Angular testing environment.
.then(([testing, testingBrowser]) => {
testing.getTestBed().initTestEnvironment(
testingBrowser.BrowserDynamicTestingModule,
testingBrowser.platformBrowserDynamicTesting()
);
})
// Then we find all the tests.
.then(() => require.context('./', true, /\.spec\.ts/))
// And load the modules.
.then(context => context.keys().map(context))
// Finally, start Karma to run the tests.
.then(__karma__.start, __karma__.error);
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);
// Then we find all the tests.
let context: any = require.context('./', true, /\.spec\.ts/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();

export class TestUtils {

Expand All @@ -58,7 +55,7 @@ export class TestUtils {
...components,
],
providers: [
App, Platform, Form, Keyboard, MenuController, NavController,
App, Platform, Form, Keyboard, DomController, MenuController, NavController,
{provide: Config, useClass: ConfigMock},
{provide: ClickersService, useClass: ClickersServiceMock},
],
Expand Down
13 changes: 10 additions & 3 deletions src/theme/variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Ionic Variables and Theming. For more info, please see:
// http://ionicframework.com/docs/v2/theming/
$font-path: "../assets/fonts";

@import "ionic.globals";


Expand All @@ -10,8 +12,7 @@
// To view all the possible Ionic variables, see:
// http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/

$text-color: #000;
$background-color: #fff;



// Named Color Variables
Expand Down Expand Up @@ -67,5 +68,11 @@ $colors: (
// The premium icon font for Ionic. For more info, please see:
// http://ionicframework.com/docs/v2/ionicons/

$ionicons-font-path: "../assets/fonts";
@import "ionicons";


// Fonts
// --------------------------------------------------

@import "roboto";
@import "noto-sans";
1 change: 1 addition & 0 deletions src/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
Expand Down
Loading

0 comments on commit b27aade

Please sign in to comment.