Browse Source

update app structure and dependencies

robert2206 8 years ago
parent
commit
c943dd2a20

+ 1 - 1
config.xml

@@ -55,6 +55,6 @@
     <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.0" />
     <plugin name="cordova-sqlite-storage" spec="~2.0.1" />
+    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
 </widget>

+ 19 - 22
package.json

@@ -4,29 +4,26 @@
   "homepage": "http://ionicframework.com/",
   "private": true,
   "scripts": {
+    "clean": "ionic-app-scripts clean",
     "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"
   },
   "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",
-    "@ionic/storage": "1.1.6",
+    "@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.7",
     "async": "^2.1.2",
     "chart.js": "^2.3.0",
-    "ionic-angular": "2.0.0-rc.3",
-    "ionic-native": "2.2.3",
+    "ionic-angular": "2.0.0",
+    "ionic-native": "2.4.1",
     "ionicons": "3.0.0",
     "pouchdb": "^6.0.7",
     "pouchdb-adapter-cordova-sqlite": "^2.0.0",
@@ -38,16 +35,16 @@
     "rollup-plugin-node-builtins": "^2.0.0",
     "rollup-plugin-node-globals": "^1.0.9",
     "rxjs": "5.0.0-beta.12",
-    "zone.js": "0.6.26"
+    "zone.js": "0.6.26",
+    "sw-toolbox": "3.4.0"
   },
   "devDependencies": {
-    "@ionic/app-scripts": "0.0.45",
-    "typescript": "2.0.6",
+    "@ionic/app-scripts": "^1.0.0",
     "gaze": "^1.1.2",
     "ng2-chartjs2": "^1.2.0",
     "node-sass": "^3.13.0",
     "tsc-wrapper": "^1.0.0",
-    "zone.js": "^0.6.26"
+    "typescript": "2.0.9"
   },
   "description": "odoo_mobile: An Ionic project",
   "cordovaPlugins": [

+ 0 - 7
src/app/main.prod.ts

@@ -1,7 +0,0 @@
-import { platformBrowser } from '@angular/platform-browser';
-import { enableProdMode } from '@angular/core';
-
-import { AppModuleNgFactory } from './app.module.ngfactory';
-
-enableProdMode();
-platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);

+ 1 - 1
src/app/main.dev.ts → src/app/main.ts

@@ -2,4 +2,4 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
 
 import { AppModule } from './app.module';
 
-platformBrowserDynamic().bootstrapModule(AppModule);
+platformBrowserDynamic().bootstrapModule(AppModule);

+ 1 - 1
src/defaults/default-list-view.ts

@@ -18,7 +18,7 @@ export abstract class ListView<E> implements OnInit, OnDestroy {
 
     constructor(_type: any) {
         this._type = _type;
-        this._document = Reflect.getMetadata("document", _type);
+        this._document = Reflect.get(_type, "document");
         this._isSearch = false;
         this._itemsAux = [];
         this._items = [];

+ 2 - 2
src/models/sale.order.ts

@@ -1,7 +1,7 @@
 import { BaseModel } from "./base.model";
 
-@Reflect.metadata("document", "sale.order")
-@Reflect.metadata("endpoint", "sale_order")    
+// @Reflect.metadata("document", "sale.order")
+// @Reflect.metadata("endpoint", "sale_order")    
 export class SaleOrder extends BaseModel {
 
     public amount_tax: number;

+ 6 - 6
src/providers/base-sync-provider.ts

@@ -57,14 +57,14 @@ export abstract class BaseSyncProvider<T> {
     /**
      *
      */
-    private getDocumentType(): string {
-        return Reflect.getMetadata("document", this);
-    }
+    // private getDocumentType(): string {
+    //     return Reflect.getMetadata("document", this);
+    // }
     
     /**
      *
      */
-    private getRestEntrypoint(): string {
-        return Reflect.getMetadata("entrypoint", this);
-    }
+    // private getRestEntrypoint(): string {
+    //     return Reflect.getMetadata("entrypoint", this);
+    // }
 }

+ 7 - 0
tsconfig.json

@@ -10,8 +10,15 @@
         ],
         "module": "es2015",
         "moduleResolution": "node",
+        "sourceMap": true,
         "target": "es5"
     },
+    "include": [
+        "src/**/*.ts"
+    ],
+    "exclude": [
+        "node_modules"
+    ],
     "compileOnSave": false,
     "atom": {
         "rewriteTsconfig": false