Skip to content

Commit

Permalink
Upgrading everything to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Apr 13, 2016
1 parent 6efd5b1 commit 5649061
Show file tree
Hide file tree
Showing 64 changed files with 418 additions and 141 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ log.txt
coverage/
bower_components/
dist/
hooks/after_prepare/010_add_platform_class.js
resources/
node_modules/
tmp/
temp/
Expand Down
9 changes: 3 additions & 6 deletions app/components/clickerButton/clickerButton.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
'use strict';

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

@Component({
selector: 'clicker-button',
inputs: ['clicker: clicker'],
})

@View({
templateUrl: 'build/components/clickerButton/clickerButton.html',
directives: [Button],
})
Expand Down
5 changes: 1 addition & 4 deletions app/components/clickerForm/clickerForm.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
'use strict';

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

@Component({
selector: 'clicker-form',
})

@View({
templateUrl: 'build/components/clickerForm/clickerForm.html',
directives: [Button, Icon, Item, Label, TextInput],
})
Expand Down
1 change: 0 additions & 1 deletion app/pages/clickerList/clickerList.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe('ClickerList', () => {

it('should switch into clickers page from menu', () => {
element(by.css('.bar-button-menutoggle')).click();
element.all(by.css('ion-label')).first().click();
expect(element.all(by.css('.toolbar-title')).last().getText()).toEqual('Clickers');
});

Expand Down
4 changes: 4 additions & 0 deletions app/pages/clickerList/clickerList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class MockClass {
public get(): any {
return {};
}

public getBoolean(): any {
return true;
}
};

let clickerList: ClickerList = null;
Expand Down
8 changes: 5 additions & 3 deletions app/pages/page2/page2.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ describe('Page2', () => {
});

it('should have correct text when Goodbye Ionic is selected', () => {
element(by.css('.bar-button-menutoggle')).click();
element.all(by.css('ion-label')).last().click();
expect(message.getText()).toEqual('Bye!');
element(by.css('.bar-button-menutoggle')).click().then(() => {
browser.driver.sleep(2000); // wait for the animation
element.all(by.css('ion-label')).last().click();
expect(message.getText()).toEqual('Bye!');
});
});
});
8 changes: 6 additions & 2 deletions app/services/clickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ export class Clickers {
let ids: Array<string> = [];
this.storage.get('ids') // return the promise so we can chain initClickers
.then((rawIds: string) => {
// ids are stored as stringified JSON array
ids = JSON.parse(rawIds) || [];
if (rawIds) {
// ids are stored as stringified JSON array
ids = JSON.parse(rawIds);
} else {
ids = [];
}
})
.then(() => resolve(ids));
});
Expand Down
5 changes: 5 additions & 0 deletions app/theme/app.variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// http://ionicframework.com/docs/v2/theming/

// Ionic Shared Functions
// --------------------------------------------------
// Makes Ionic Sass functions available to your App

@import 'globals.core';

// App Shared Variables
// --------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>V2 Test</name>
<name>Clicker</name>
<description>An Ionic Framework and Cordova project.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
Expand Down Expand Up @@ -29,7 +29,7 @@
<plugin name="cordova-plugin-device" spec="~1.1.1" />
<plugin name="cordova-plugin-console" spec="~1.0.2" />
<plugin name="cordova-plugin-whitelist" spec="~1.2.1" />
<plugin name="cordova-plugin-splashscreen" spec="~3.1.0" />
<plugin name="cordova-plugin-splashscreen" spec="~3.2.1" />
<plugin name="cordova-plugin-statusbar" spec="~2.1.2" />
<plugin name="ionic-plugin-keyboard" spec="~2.0.1" />
</widget>
Expand Down
66 changes: 43 additions & 23 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,61 @@


var gulp = require('gulp'),
gulpWatch = require('gulp-watch'),
del = require('del'),
runSequence = require('run-sequence'),
argv = process.argv;


/**
* Ionic hooks
* Add ':before' or ':after' to any Ionic project command name to run the specified
* tasks before or after the command.
*/
gulp.task('serve:before', ['watch']);
gulp.task('emulate:before', ['build']);
gulp.task('deploy:before', ['build']);
gulp.task('build:before', ['build']);

// we want to 'watch' when livereloading
var shouldWatch = argv.indexOf('-l') > -1 || argv.indexOf('--livereload') > -1;
gulp.task('run:before', [shouldWatch ? 'watch' : 'build']);

/**
* Ionic Gulp tasks, for more information on each see
* https://github.com/driftyco/ionic-gulp-tasks
*
* Using these will allow you to stay up to date if the default Ionic 2 build
* changes, but you are of course welcome (and encouraged) to customize your
* build however you see fit.
*/
var buildWebpack = require('ionic-gulp-webpack-build');
var buildBrowserify = require('ionic-gulp-browserify-typescript');
var buildSass = require('ionic-gulp-sass-build');
var copyHTML = require('ionic-gulp-html-copy');
var copyFonts = require('ionic-gulp-fonts-copy');
var copyScripts = require('ionic-gulp-scripts-copy');

gulp.task('watch', ['sass', 'html', 'fonts'], function(){
gulpWatch('app/**/*.scss', function(){ gulp.start('sass'); });
gulpWatch('app/**/*.html', function(){ gulp.start('html'); });
return buildWebpack({ watch: true });
gulp.task('watch', ['clean'], function(done){
runSequence(
['sass', 'html', 'fonts', 'scripts'],
function(){
gulpWatch('app/**/*.scss', function(){ gulp.start('sass'); });
gulpWatch('app/**/*.html', function(){ gulp.start('html'); });
buildBrowserify({ watch: true }).on('end', done);
}
);
});

gulp.task('build', ['clean'], function(done){
runSequence(
['sass', 'html', 'fonts', 'scripts'],
function(){
buildBrowserify().on('end', done);
}
);
});
gulp.task('build', ['sass', 'html', 'fonts'], buildWebpack);
gulp.task('sass', buildSass);
gulp.task('html', copyHTML);
gulp.task('fonts', copyFonts);
gulp.task('clean', function(done){
del('www/build', done);
gulp.task('scripts', copyScripts);
gulp.task('clean', function(){
return del('www/build');
});

/**
* Ionic hooks
* Add ':before' or ':after' to any Ionic project command name to run the specified
* tasks before or after the command.
*/
gulp.task('serve:before', ['watch']);
gulp.task('emulate:before', ['build']);
gulp.task('deploy:before', ['build']);

// we want to 'watch' when livereloading
var shouldWatch = argv.indexOf('-l') > -1 || argv.indexOf('--livereload') > -1;
gulp.task('run:before', [shouldWatch ? 'watch' : 'build']);

0 comments on commit 5649061

Please sign in to comment.