chore(): remove unnecessary name option from Plugin decorator

At least for now, we get the name of the plugin from the class.
This commit is contained in:
Tim Lancina 2016-03-04 14:04:38 -06:00
parent fc54fefde5
commit 5ad72de3d3
18 changed files with 2 additions and 23 deletions

View File

@ -9,7 +9,6 @@ Let's take a look at the existing plugin wrapper for Geolocation to see what goe
```
@Plugin({
name: 'Geolocation',
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation'
})
@ -49,7 +48,6 @@ For example, the `@Plugin` decorator adds information about the plugin to our Ge
```
@Plugin({
name: 'Geolocation',
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation'
})
@ -58,9 +56,7 @@ export class Geolocation {
}
```
Here, `name` refers to the name of the plugin, which is used by Ionic Native for logging messages.
`plugin` is the name of the plugin package on npm and used when calling `cordova plugin add`, also used for logging purposes.
Here, `plugin` is the name of the plugin package on npm and used when calling `cordova plugin add`.
`pluginRef` refers to the where on `window` the underlying Cordova plugin is normally exposed. For example, in the case of the Cordova Geolocation plugin, normally you would make calls like `window.navigator.geolocation.getCurrentPosition({}, success, error)`, so the `pluginRef` in this case is `navigator.geolocation`.

View File

@ -25,7 +25,6 @@ import {Plugin, Cordova} from './plugin';
*
*/
@Plugin({
name: 'ActionSheet',
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet'

View File

@ -21,7 +21,6 @@ declare var window;
* ```
*/
@Plugin({
name: 'AppRate',
plugin: 'cordova-plugin-apprate',
pluginRef: 'AppRate'
})

View File

@ -18,7 +18,6 @@ import {Plugin, Cordova} from './plugin';
* ```
*/
@Plugin({
name: 'AppVersion',
plugin: 'cordova-plugin-appversion',
pluginRef: 'cordova.getAppVersion'
})

View File

@ -17,7 +17,6 @@ import {Plugin, Cordova} from './plugin';
* ```
*/
@Plugin({
name: 'Badge',
plugin: 'cordova-plugin-badge',
pluginRef: 'cordova.plugins.notification.badge'
})

View File

@ -17,7 +17,6 @@ import {Plugin, Cordova} from './plugin';
* ```
*/
@Plugin({
name: 'BarcodeScanner',
plugin: 'phonegap-plugin-barcodescanner',
pluginRef: 'cordova.plugins.barcodeScanner',
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner'

View File

@ -160,7 +160,6 @@ import {Observable} from 'rxjs/Observable';
*
*/
@Plugin({
name: 'BLE',
plugin: 'cordova-plugin-ble-central',
pluginRef: 'ble',
repo: 'https://github.com/don/cordova-plugin-ble-central'

View File

@ -25,7 +25,6 @@ export interface Calendar {
*
*/
@Plugin({
name: 'Calendar',
plugin: 'cordova-plugin-calendar',
pluginRef: 'plugins.calendar',
repo: 'https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin'

View File

@ -102,7 +102,6 @@ export interface CameraPopoverOptions {
* ```
*/
@Plugin({
name: 'Camera',
plugin: 'cordova-plugin-camera',
pluginRef: 'navigator.camera',
repo: 'https://github.com/apache/cordova-plugin-camera'

View File

@ -25,7 +25,6 @@ import {Plugin, Cordova} from './plugin';
* ```
*/
@Plugin({
name: 'Clipboard',
plugin: 'com.verso.cordova.clipboard',
pluginRef: 'cordova.plugins.clipboard'
})

View File

@ -207,7 +207,6 @@ declare var Contact: {
*
*/
@Plugin({
name: 'Contacts',
plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts'

View File

@ -19,7 +19,6 @@ import {Plugin, Cordova} from './plugin';
*
*/
@Plugin({
name: 'DatePicker',
plugin: 'cordova-plugin-datepicker',
pluginRef: 'plugins.datePicker'
})

View File

@ -70,7 +70,6 @@ import {Plugin, Cordova} from './plugin';
*
*/
@Plugin({
name: 'Facebook',
plugin: 'cordova-plugin-facebook4',
pluginRef: 'facebookConnectPlugin',
repo: 'https://github.com/jeduan/cordova-plugin-facebook4'

View File

@ -115,7 +115,6 @@ export interface GeolocationOptions {
* ```
*/
@Plugin({
name: 'Geolocation',
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation'
})

View File

@ -256,7 +256,6 @@ declare var PushNotification: {
* For TypeScript users, see the [Push plugin docs about using TypeScript for custom notifications](https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/TYPESCRIPT.md).
*/
@Plugin({
name: 'Push',
plugin: 'phonegap-plugin-push',
pluginRef: 'PushNotification',
repo: 'https://github.com/phonegap/phonegap-plugin-push'

View File

@ -9,7 +9,6 @@ declare var window;
* Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
*/
@Plugin({
name: 'StatusBar',
plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar',
repo: 'https://github.com/apache/cordova-plugin-statusbar'

View File

@ -13,7 +13,6 @@ export interface ToastOptions {
* Requires Cordova plugin: `cordova-plugin-x-toast`. For more info, please see the [Toast plugin docs](https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin).
*/
@Plugin({
name: 'Toast',
plugin: 'cordova-plugin-x-toast',
pluginRef: 'plugins.toast',
repo: 'https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin'

View File

@ -22,7 +22,6 @@ import {Plugin, Cordova} from './plugin';
*
*/
@Plugin({
name: 'TouchID',
plugin: 'cordova-plugin-touch-id',
pluginRef: 'plugins.touchid',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-touch-id'