chore(package): Angular 5 support (#2089)

* docs(github): issue template

* initial commit

* Added StatusObject Interface

* style(wrap.tmpl): added missing field

* style(wrap.tmpl): added missing field

* chore(package.json): Angular 5 support

I also bumped the tslint rules and tslint

* Update package.json
This commit is contained in:
Daniel Sogl 2017-11-09 22:12:48 +01:00 committed by Ibby Hadeed
parent 196be026ea
commit 95daca166b
5 changed files with 11695 additions and 6791 deletions

View File

@ -1,7 +1,7 @@
**I'm submitting a ...** (check one with "x")
[ ] bug report
[ ] feature request
<!-- Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/ -->
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
**Current behavior:**
<!-- Describe how the bug manifests. -->
@ -21,8 +21,8 @@ insert any relevant code here
**Other information:**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
**package.json info:**
**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):
```json
insert the content here
```
insert the output from ionic info here
```

18430
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
"@angular/core": "5.0.0",
"@types/cordova": "0.0.34",
"@types/jasmine": "^2.5.51",
"@types/node": "^7.0.27",
"@types/node": "^8.0.47",
"canonical-path": "0.0.2",
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "1.3.1",
@ -44,7 +44,7 @@
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "~2.4.2",
"zone.js": "^0.8.18"
"zone.js": "0.8.18"
},
"scripts": {
"start": "npm run test:watch",

View File

@ -1,9 +1,23 @@
import { Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* This is a template for new plugin wrappers
*
* TODO:
* - Add/Change information below
* - Document usage (importing, executing main functionality)
* - Remove any imports that you are not using
* - Add this file to /src/index.ts (follow style of other plugins)
* - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
* - Remove this note
*
*/
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name {{ Plugin_Name }}
* @description
* This plugin does something
*
* @usage
* ```typescript
@ -15,16 +29,33 @@ import { Injectable } from '@angular/core';
* ...
*
*
* this.{{ pluginName }}.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: '{{ PluginName }}',
plugin: '',
pluginRef: '',
repo: '',
platforms: []
plugin: '', // npm package name, example: cordova-plugin-camera
pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation
repo: '', // the github repository URL for the plugin
install: '', // OPTIONAL install command, in case the plugin requires variables
installVariables: [], // OPTIONAL the plugin requires variables
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
})
@Injectable()
export class {{ PluginName }} extends IonicNativePlugin {
/**
* This function does something
* @param arg1 {string} Some param to configure something
* @param arg2 {number} Another param to configure something
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
functionName(arg1: string, arg2: number): Promise<any> {
return; // We add return; here to avoid any IDE / Compiler errors
}
}

View File

@ -40,8 +40,9 @@ import { Observable } from 'rxjs/Observable';
plugin: '', // npm package name, example: cordova-plugin-camera
pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation
repo: '', // the github repository URL for the plugin
platforms: [], // Array of platforms supported, example: ['Android', 'iOS']
install: '', // OPTIONAL install command, in case the plugin requires variables
installVariables: [], // OPTIONAL the plugin requires variables
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
})
@Injectable()
export class {{ PluginName }} extends IonicNativePlugin {