mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:23:10 +08:00
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:
parent
fc54fefde5
commit
5ad72de3d3
@ -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`.
|
||||
|
||||
|
@ -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'
|
||||
@ -46,7 +45,7 @@ export class ActionSheet {
|
||||
* | addDestructiveButtonWithLabel |`string` | Add a destructive button with text |
|
||||
* | position |`number[]` | On an iPad, set the X,Y position |
|
||||
*
|
||||
* @param {options} Options See table above
|
||||
* @param {options} Options See table above
|
||||
* @returns {Promise} Returns a Promise that resolves with the index of the
|
||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||
*/
|
||||
|
@ -21,7 +21,6 @@ declare var window;
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AppRate',
|
||||
plugin: 'cordova-plugin-apprate',
|
||||
pluginRef: 'AppRate'
|
||||
})
|
||||
|
@ -18,7 +18,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'AppVersion',
|
||||
plugin: 'cordova-plugin-appversion',
|
||||
pluginRef: 'cordova.getAppVersion'
|
||||
})
|
||||
|
@ -17,7 +17,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Badge',
|
||||
plugin: 'cordova-plugin-badge',
|
||||
pluginRef: 'cordova.plugins.notification.badge'
|
||||
})
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -25,7 +25,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Clipboard',
|
||||
plugin: 'com.verso.cordova.clipboard',
|
||||
pluginRef: 'cordova.plugins.clipboard'
|
||||
})
|
||||
|
@ -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'
|
||||
|
@ -19,7 +19,6 @@ import {Plugin, Cordova} from './plugin';
|
||||
*
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'DatePicker',
|
||||
plugin: 'cordova-plugin-datepicker',
|
||||
pluginRef: 'plugins.datePicker'
|
||||
})
|
||||
|
@ -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'
|
||||
|
@ -115,7 +115,6 @@ export interface GeolocationOptions {
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
name: 'Geolocation',
|
||||
plugin: 'cordova-plugin-geolocation',
|
||||
pluginRef: 'navigator.geolocation'
|
||||
})
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user