Skip to content

Commit

Permalink
Update to ionic 3.9.2 @angular/cli 1.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Nov 25, 2017
1 parent 7bcd9ee commit c44ac55
Show file tree
Hide file tree
Showing 22 changed files with 110 additions and 85 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
# deps already installed in image
- checkout

# to be removed after merged in and docker updated
- run:
name: install dependencies
command: npm install

- run:
name: debug environment
command: ionic info
Expand Down
14 changes: 5 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org

# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ log.txt
npm-debug.log*

.idea/
.sourcemaps/
.sass-cache/
.tmp/
.versions/
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<a name="2.21.0"></a>
# 2.21.0 (2017-11-25)
### Features

* **Update**: Update to Ionic 3.9.2 and @angular/cli 1.5.4 (implying @angular 5.0.1) ([](https://github.com/lathonez/clicker/commit/))

<a name="2.20.1"></a>
# 2.20.1 (2017-10-13)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ See the changelog [here](https://github.com/lathonez/clicker/blob/master/CHANGEL

## Updated for:

* **@angular/*:** 4.1.3
* **@angular/cli:**: 1.1.2
* **@ionic-angular:** 3.4.2
* **@angular/*:** 5.0.4
* **@angular/cli:**: 1.5.4
* **@ionic-angular:** 3.9.2
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install -g cordova@7.0.1 ionic@3.9.2
- npm install -g cordova@7.1.0 ionic@3.19.0
- npm install

build: none
Expand Down
23 changes: 11 additions & 12 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
<author email="shazleto@gmail.com" href="http://ionicframework.com/">Stephen Hazleton</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="http://ionic.local/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
Expand Down Expand Up @@ -64,6 +61,7 @@
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
Expand All @@ -76,14 +74,15 @@
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<engine name="android" spec="6.2.3" />
<engine name="browser" spec="4.1.0" />
<engine name="ios" spec="4.4.0" />
<plugin name="cordova-plugin-console" spec="1.0.7" />
<plugin name="cordova-plugin-device" spec="1.1.6" />
<plugin name="cordova-plugin-splashscreen" spec="4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="2.2.3" />
<plugin name="cordova-plugin-whitelist" spec="1.3.2" />
<engine name="android" spec="6.4.0" />
<engine name="browser" spec="5.0.1" />
<engine name="ios" spec="4.5.4" />
<plugin name="cordova-plugin-console" spec="1.1.0" />
<plugin name="cordova-plugin-device" spec="1.1.7" />
<plugin name="cordova-plugin-splashscreen" spec="4.1.0" />
<plugin name="cordova-plugin-statusbar" spec="2.3.0" />
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="ionic-plugin-keyboard" spec="2.2.1" />
</widget>
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && \
apt-get install -y nodejs && \
\
# Install Ionic global deps \
npm install -g ionic@3.9.2 cordova@7.0.1 && \
npm install -g ionic@3.19.0 cordova@7.1.0 && \
\
# Install Chrome \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
Expand Down
1 change: 1 addition & 0 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../tsconfig.ng-cli.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
Expand Down
76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,59 @@
"test-coverage": "ng test --code-coverage",
"test-ci": "ng test --watch=false --code-coverage"
},
"version": "2.20.1",
"version": "2.21.0",
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@angular/router": "4.1.3",
"@ionic-native/core": "3.12.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"cordova-android": "6.2.3",
"cordova-browser": "4.1.0",
"cordova-ios": "4.4.0",
"cordova-plugin-console": "1.0.7",
"cordova-plugin-device": "1.1.6",
"cordova-plugin-splashscreen": "4.0.3",
"cordova-plugin-statusbar": "2.2.3",
"cordova-plugin-whitelist": "1.3.2",
"ionic-angular": "3.6.0",
"@angular/common": "5.0.1",
"@angular/compiler": "5.0.1",
"@angular/compiler-cli": "5.0.1",
"@angular/core": "5.0.1",
"@angular/forms": "5.0.1",
"@angular/http": "5.0.1",
"@angular/platform-browser": "5.0.1",
"@angular/platform-browser-dynamic": "5.0.1",
"@angular/router": "5.0.1",
"@ionic-native/core": "4.4.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/storage": "2.1.3",
"cordova-android": "6.4.0",
"cordova-browser": "5.0.1",
"cordova-ios": "4.5.4",
"cordova-plugin-console": "1.1.0",
"cordova-plugin-device": "1.1.7",
"cordova-plugin-splashscreen": "4.1.0",
"cordova-plugin-statusbar": "2.3.0",
"cordova-plugin-whitelist": "1.3.3",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.4.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
"zone.js": "0.8.18"
},
"devDependencies": {
"@angular/cli": "1.3.2",
"@ionic/app-scripts": "2.1.3",
"@angular/cli": "1.5.4",
"@ionic/app-scripts": "3.1.2",
"@types/jasmine": "2.5.54",
"@types/node": "7.0.4",
"codecov": "2.3.0",
"connect": "3.6.3",
"ionic-mocks": "0.13.0",
"jasmine-core": "2.6.2",
"codecov": "3.0.0",
"connect": "3.6.5",
"ionic-mocks": "1.0.4",
"jasmine-core": "2.8.0",
"jasmine-reporters": "2.2.1",
"karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.2.1",
"karma-coverage-istanbul-reporter": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"karma-junit-reporter": "1.2.0",
"protractor": "5.1.2",
"serve-static": "1.12.4",
"protractor": "5.2.0",
"serve-static": "1.13.1",
"ts-node": "3.3.0",
"tslint": "5.6.0",
"tslint": "5.8.0",
"tslint-eslint-rules": "4.1.1",
"typescript": "2.3.4"
"typescript": "2.4.2"
},
"repository": {
"type": "git",
Expand Down
11 changes: 8 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@ export class ClickerApp {
private splash: SplashScreen;
private status: StatusBar;

public rootPage: any;
// make ClcikerList the root (or first) page
public rootPage: any = ClickerList;
public pages: Array<{ title: string, component: any }>;

constructor(platform: Platform, menu: MenuController, splash: SplashScreen, status: StatusBar) {
constructor(
platform: Platform,
menu: MenuController,
splash: SplashScreen,
status: StatusBar,
) {

this.menu = menu;
this.platform = platform;
this.splash = splash;
this.status = status;

this.rootPage = ClickerList;
this.initializeApp();

// set our app's pages
Expand Down
8 changes: 6 additions & 2 deletions src/app/app.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClickerApp } from './app.component';
import { MenuMock, NavMock, PlatformMock, StatusBarMock, SplashScreenMock } from 'ionic-mocks';
import { MenuMock, PlatformMock, StatusBarMock, SplashScreenMock } from 'ionic-mocks';
import { Page2 } from '../pages';

let instance: ClickerApp = null;
Expand All @@ -8,7 +8,11 @@ describe('ClickerApp', () => {

beforeEach(() => {
instance = new ClickerApp((<any> PlatformMock.instance()), (<any> MenuMock.instance()), (<any>SplashScreenMock.instance()), (<any>StatusBarMock.instance()));
instance['nav'] = NavMock.instance();

// ionic-mocks have lost the nav mock
instance.nav = (<any>{});
instance.nav.setRoot = (<any>(() => true));
spyOn(instance.nav, 'setRoot');
});

it('initialises with two possible pages', () => {
Expand Down
Binary file added src/assets/imgs/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">

<!-- cordova.js required for cordova apps -->
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>

<!-- un-comment this code to enable service worker
Expand Down
4 changes: 2 additions & 2 deletions src/pages/page2/page2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
}

.bye-ionic {
background-image: url('../../images/ionic.png');
background-image: url('/assets/imgs/logo.png');
background-repeat: no-repeat;
}
}
12 changes: 8 additions & 4 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,25 @@
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/** ALL Firefox browsers require the following to support `@angular/animation`. **/
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.


Expand Down
4 changes: 2 additions & 2 deletions src/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Check out https://googlechrome.github.io/sw-toolbox/ for
* Check out https://googlechromelabs.github.io/sw-toolbox/ for
* more info on how to use sw-toolbox to custom configure your service worker.
*/

Expand All @@ -24,7 +24,7 @@ self.toolbox.precache(
);

// dynamically cache any other local assets
self.toolbox.router.any('/*', self.toolbox.cacheFirst);
self.toolbox.router.any('/*', self.toolbox.fastest);

// for any other requests go to the network, cache,
// and then only use that cached resource if your user goes offline
Expand Down
4 changes: 2 additions & 2 deletions src/services/clickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export class ClickersService {
}

// initialise Clickers from SQL storage given an array of ids
private initClickers(ids: Array<string>): Promise<{}> {
private initClickers(ids: Array<string>): Promise<Array<Clicker>> {
// get all existing ids
let proms: Array<Promise<string>> = [];
let proms: Array<Promise<string>>;

proms = ids.map(id => this.storage.get(id));

Expand Down
2 changes: 1 addition & 1 deletion src/services/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class StorageService {
return new Storage({});
}

public get(key: string): Promise<{}> {
public get(key: string): Promise<string> {
return this.storage.get(key);
}

Expand Down
4 changes: 2 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { ClickersServiceMock } from './services/clickers.mock';
import { ClickersService } from './services';

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
declare var require: any;
declare const __karma__: any;
declare const require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function (): void {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $app-direction: ltr;
// The "primary" color is the only required color in the map.

$colors: (
primary: #387ef5,
primary: #488aff,
secondary: #32db64,
danger: #f53d3d,
light: #f4f4f4,
Expand Down

0 comments on commit c44ac55

Please sign in to comment.