feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025)

* feat(CouchbaseLite): add CouchbaseLite cordova plugin

* add plugin url
This commit is contained in:
Sumama Waheed 2017-03-01 21:15:51 -05:00 committed by Ibby Hadeed
parent fd8107b79a
commit 09a7dcf594
2 changed files with 38 additions and 0 deletions

View File

@ -32,6 +32,7 @@ import { CardIO } from './plugins/card-io';
import { Clipboard } from './plugins/clipboard';
import { CodePush } from './plugins/code-push';
import { Contacts } from './plugins/contacts';
import { CouchbaseLite } from './plugins/couchbase-lite';
import { Crop } from './plugins/crop';
import { DatePicker } from './plugins/datepicker';
import { DBMeter } from './plugins/dbmeter';
@ -159,6 +160,7 @@ export * from './plugins/card-io';
export * from './plugins/clipboard';
export * from './plugins/code-push';
export * from './plugins/contacts';
export * from './plugins/couchbase-lite';
export * from './plugins/crop';
export * from './plugins/datepicker';
export * from './plugins/dbmeter';
@ -288,6 +290,7 @@ window['IonicNative'] = {
Clipboard,
CodePush,
Contacts,
CouchbaseLite,
Crop,
DatePicker,
DBMeter,

View File

@ -0,0 +1,35 @@
import { Plugin, Cordova } from './plugin';
/**
* @name Couchbase Lite
* @description
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
*
* @usage
* ```
* import { CouchbaseLite } from 'ionic-native';
*
* CouchbaseLite.getURL()
* .then((url: any) => console.log(url))
* .catch((error: any) => console.log(error));
*
* ```
*/
@Plugin({
pluginName: 'CouchbaseLite',
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
pluginRef: 'cblite',
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
})
export class CouchbaseLite {
/**
* Get the database url
* @return {Promise<any>} Returns a promise that resolves with the local database url
*/
@Cordova({
callbackStyle: 'node'
})
static getURL(): Promise<any> { return; }
}