-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rollbar): add Rollbar plugin (#832)
* Add Rollbar plugin * Add documentation * Add return type to init function * Remove init params
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; } | ||
|
||
} |