Skip to content

Commit 48c8592

Browse files
committed
updating to the newest ionic 2-beta.4
1 parent b25d294 commit 48c8592

File tree

19 files changed

+10184
-87
lines changed

19 files changed

+10184
-87
lines changed

app/app.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { App, IonicApp, Platform, Alert } from "ionic/ionic";
1+
import "es6-shim";
2+
import { App, IonicApp, Platform, Alert } from "ionic-angular";
23
import { GeofenceListPage } from "./pages/geofence-list/geofence-list";
34
import * as Leaflet from "leaflet";
45
import { GeofenceService } from "./services/geofence-service";

app/components/geofence-list-item/geofence-list-item.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Input, Output, EventEmitter } from "angular2/core";
22
import { Geofence } from "../../models/geofence";
3-
import { IONIC_DIRECTIVES } from "ionic/ionic";
3+
import { IONIC_DIRECTIVES } from "ionic-angular";
44
import { GeofenceService } from "../../services/geofence-service";
55

66
/*

app/pages/geofence-details/geofence-details.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page, NavController, NavParams, IonicApp } from "ionic/ionic";
1+
import { Page, NavController, NavParams, IonicApp } from "ionic-angular";
22
import * as Leaflet from "leaflet";
33
import { GeofenceService } from "../../services/geofence-service";
44
import { Geofence } from "../../models/geofence";

app/pages/geofence-list/geofence-list.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page, NavController, Platform, IonicApp } from "ionic/ionic";
1+
import { Page, NavController, Platform, IonicApp } from "ionic-angular";
22
import { GeofenceDetailsPage } from "../geofence-details/geofence-details";
33
import { GeofenceService } from "../../services/geofence-service";
44
import { GeofenceListItem } from "../../components/geofence-list-item/geofence-list-item";

gulpfile.js

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
var gulp = require('gulp'),
2+
gulpWatch = require('gulp-watch'),
3+
del = require('del'),
4+
runSequence = require('run-sequence'),
5+
argv = process.argv;
6+
7+
8+
/**
9+
* Ionic hooks
10+
* Add ':before' or ':after' to any Ionic project command name to run the specified
11+
* tasks before or after the command.
12+
*/
13+
gulp.task('serve:before', ['watch']);
14+
gulp.task('emulate:before', ['build']);
15+
gulp.task('deploy:before', ['build']);
16+
gulp.task('build:before', ['build']);
17+
18+
// we want to 'watch' when livereloading
19+
var shouldWatch = argv.indexOf('-l') > -1 || argv.indexOf('--livereload') > -1;
20+
gulp.task('run:before', [shouldWatch ? 'watch' : 'build']);
21+
22+
/**
23+
* Ionic Gulp tasks, for more information on each see
24+
* https://github.com/driftyco/ionic-gulp-tasks
25+
*
26+
* Using these will allow you to stay up to date if the default Ionic 2 build
27+
* changes, but you are of course welcome (and encouraged) to customize your
28+
* build however you see fit.
29+
*/
30+
var buildBrowserify = require('ionic-gulp-browserify-typescript');
31+
var buildSass = require('ionic-gulp-sass-build');
32+
var copyHTML = require('ionic-gulp-html-copy');
33+
var copyFonts = require('ionic-gulp-fonts-copy');
34+
var copyScripts = require('ionic-gulp-scripts-copy');
35+
36+
gulp.task('watch', ['clean'], function(done){
37+
runSequence(
38+
['sass', 'html', 'fonts', 'scripts'],
39+
function(){
40+
gulpWatch('app/**/*.scss', function(){ gulp.start('sass'); });
41+
gulpWatch('app/**/*.html', function(){ gulp.start('html'); });
42+
buildBrowserify({ watch: true }).on('end', done);
43+
}
44+
);
45+
});
46+
47+
gulp.task('build', ['clean'], function(done){
48+
runSequence(
49+
['sass', 'html', 'fonts', 'scripts'],
50+
function(){
51+
buildBrowserify().on('end', done);
52+
}
53+
);
54+
});
55+
gulp.task('sass', function(){
56+
return buildSass({
57+
sassOptions: {
58+
includePaths: [
59+
'node_modules/ionic-angular',
60+
'node_modules/ionicons/dist/scss',
61+
'node_modules/leaflet/dist'
62+
]
63+
}
64+
});
65+
});
66+
gulp.task('html', copyHTML);
67+
gulp.task('fonts', copyFonts);
68+
gulp.task('scripts', copyScripts);
69+
gulp.task('clean', function(){
70+
return del('www/build');
71+
});

ionic.config.js

-55
This file was deleted.

ionic.config.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "ionic2-geofence",
3+
"app_id": "",
4+
"v2": true,
5+
"typescript": true
6+
}

ionic.project

-4
This file was deleted.

package.json

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
{
22
"dependencies": {
3-
"angular2": "2.0.0-beta.6",
3+
"angular2": "2.0.0-beta.13",
44
"es6-promise": "3.1.2",
5-
"es6-shim": "^0.33.13",
6-
"ionic-framework": "2.0.0-beta.0",
5+
"es6-shim": "^0.35.0",
6+
"ionic-angular": "2.0.0-beta.4",
7+
"ionic-native": "^1.1.0",
78
"ionicons": "3.0.0-alpha.3",
89
"leaflet": "^0.7.7",
910
"reflect-metadata": "0.1.2",
10-
"rxjs": "5.0.0-beta.0",
11-
"zone.js": "0.5.14"
11+
"rxjs": "5.0.0-beta.2",
12+
"zone.js": "0.6.6"
1213
},
1314
"devDependencies": {
14-
"awesome-typescript-loader": "0.15.10",
15-
"bower": "^1.7.7",
1615
"cordova": "^6.0.0",
16+
"del": "^2.2.0",
17+
"gulp": "^3.9.1",
18+
"gulp-watch": "^4.3.5",
1719
"ionic": "^2.0.0-beta.17",
18-
"strip-sourcemap-loader": "0.0.1",
19-
"typescript": "1.7.5",
20-
"typescript-eslint-parser": "0.1.0-alpha-1"
20+
"ionic-gulp-browserify-typescript": "^1.0.1",
21+
"ionic-gulp-fonts-copy": "^1.0.0",
22+
"ionic-gulp-html-copy": "^1.0.0",
23+
"ionic-gulp-sass-build": "^1.0.0",
24+
"ionic-gulp-scripts-copy": "^1.0.0",
25+
"run-sequence": "^1.1.5"
2126
},
2227
"name": "ionic2-geofence",
2328
"description": "ionic2-geofence: An Ionic project",

tsconfig.json

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{
22
"compilerOptions": {
3-
"allowNonTsExtensions": true,
4-
"isolatedModules": true,
5-
"noLib": true,
6-
"target": "ES5",
3+
"target": "es5",
74
"module": "commonjs",
85
"noEmitOnError": false,
9-
"rootDir": ".",
106
"emitDecoratorMetadata": true,
11-
"experimentalDecorators": true,
12-
"sourceMap": false,
13-
"inlineSourceMap": false,
14-
"inlineSources": false
7+
"experimentalDecorators": true
158
},
9+
"filesGlob": [
10+
"**/*.ts",
11+
"!node_modules/**/*"
12+
],
1613
"exclude": [
17-
"node_modules"
14+
"node_modules",
15+
"typings/main",
16+
"typings/main.d.ts"
1817
],
19-
"compileOnSave": false
20-
}
18+
"compileOnSave": false,
19+
"atom": {
20+
"rewriteTsconfig": false
21+
}
22+
}

typings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"dependencies": {},
3+
"devDependencies": {},
4+
"ambientDependencies": {
5+
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
6+
"leaflet": "registry:dt/leaflet#0.7.3+20160330160843"
7+
}
8+
}

typings/browser.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference path="browser/ambient/es6-shim/es6-shim.d.ts" />
2+
/// <reference path="browser/ambient/leaflet/index.d.ts" />

0 commit comments

Comments
 (0)