diff --git a/src/index.ts b/src/index.ts index 1c1a5756f..7aaa59590 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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, diff --git a/src/plugins/couchbase-lite.ts b/src/plugins/couchbase-lite.ts new file mode 100644 index 000000000..39d987344 --- /dev/null +++ b/src/plugins/couchbase-lite.ts @@ -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} Returns a promise that resolves with the local database url + */ + @Cordova({ + callbackStyle: 'node' + }) + static getURL(): Promise { return; } + +}