mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
feat(rollbar): add Rollbar plugin (#832)
* Add Rollbar plugin * Add documentation * Add return type to init function * Remove init params
This commit is contained in:
parent
70c15c31ca
commit
229f5509e9
@ -90,6 +90,7 @@ import { PinDialog } from './plugins/pin-dialog';
|
||||
import { PowerManagement } from './plugins/power-management';
|
||||
import { Printer } from './plugins/printer';
|
||||
import { Push } from './plugins/push';
|
||||
import { Rollbar } from './plugins/rollbar';
|
||||
import { SafariViewController } from './plugins/safari-view-controller';
|
||||
import { Screenshot } from './plugins/screenshot';
|
||||
import { SecureStorage } from './plugins/securestorage';
|
||||
@ -204,6 +205,7 @@ export * from './plugins/plugin';
|
||||
export * from './plugins/power-management';
|
||||
export * from './plugins/printer';
|
||||
export * from './plugins/push';
|
||||
export * from './plugins/rollbar';
|
||||
export * from './plugins/safari-view-controller';
|
||||
export * from './plugins/screen-orientation';
|
||||
export * from './plugins/screenshot';
|
||||
@ -319,6 +321,7 @@ window['IonicNative'] = {
|
||||
ScreenOrientation,
|
||||
PinDialog,
|
||||
PowerManagement,
|
||||
Rollbar,
|
||||
SafariViewController,
|
||||
Screenshot,
|
||||
SecureStorage,
|
||||
|
33
src/plugins/rollbar.ts
Normal file
33
src/plugins/rollbar.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Rollbar
|
||||
* @description
|
||||
* This plugin adds Rollbar App monitoring to your application
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { Rollbar } from 'ionic-native';
|
||||
*
|
||||
* Rollbar.init();
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Rollbar',
|
||||
plugin: 'resgrid-cordova-plugins-rollbar',
|
||||
pluginRef: 'Rollbar',
|
||||
repo: 'https://github.com/Resgrid/cordova-plugins-rollbar',
|
||||
platforms: ['Android', 'iOS'],
|
||||
install: 'ionic plugin add resgrid-cordova-plugins-rollbar --variable ROLLBAR_ACCESS_TOKEN="YOUR_ROLLBAR_ACCEESS_TOKEN" --variable ROLLBAR_ENVIRONMENT="ROLLBAR_ENVIRONMENT"'
|
||||
})
|
||||
export class Rollbar {
|
||||
|
||||
/**
|
||||
* This function initializes the monitoring of your application
|
||||
* @return {Promise<any>} Returns a promise that resolves when the plugin successfully initializes
|
||||
*/
|
||||
@Cordova()
|
||||
static init(): Promise<any> { return; }
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user