Skip to content

Commit

Permalink
feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025)
Browse files Browse the repository at this point in the history
* feat(CouchbaseLite): add CouchbaseLite cordova plugin

* add plugin url
  • Loading branch information
swaheed2 authored and ihadeed committed Mar 2, 2017
1 parent fd8107b commit 09a7dcf
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -288,6 +290,7 @@ window['IonicNative'] = {
Clipboard,
CodePush,
Contacts,
CouchbaseLite,
Crop,
DatePicker,
DBMeter,
Expand Down
35 changes: 35 additions & 0 deletions src/plugins/couchbase-lite.ts
Original file line number Diff line number Diff line change
@@ -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; }

}

0 comments on commit 09a7dcf

Please sign in to comment.