awesome-cordova-plugins/dist/index.js
2015-11-28 16:24:38 -06:00

51 lines
1.0 KiB
JavaScript

function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./plugins/camera'));
__export(require('./plugins/statusbar'));
__export(require('./plugins/toast'));
/*
let wrappedPlugins = {}
let promised;
function newPluginClass(config) {
let obj = {
installed: () => {
return !!obj.plugin();
},
// Get the plugin by checking the plugin ref path on window
plugin: () => {
return get(window, config.pluginRef)
},
pluginName: config.plugin
};
return obj;
}
// Go through each registered plugin
for(let i = 0; i < PluginConfig.length; i++) {
let plugin = PluginConfig[i];
// Create the wrapped class
let cls = newPluginClass(plugin);
promised = plugin.promise || [];
for(let j = 0; j < promised.length; j++) {
let method = promised[j];
let p = promisifyCordova(cls, plugin.id, method)
cls[method] = p;
}
// Save the plugin object
wrappedPlugins[plugin.className] = cls;
}
export default wrappedPlugins;
*/
//window['Native'] = wrappedPlugins;