awesome-cordova-plugins/dist/index.js

21 lines
831 B
JavaScript
Raw Normal View History

2015-11-26 01:44:58 +08:00
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
2015-11-30 06:30:15 +08:00
var DEVICE_READY_TIMEOUT = 2000;
2015-11-30 11:55:18 +08:00
__export(require('./plugins/actionsheet'));
2015-12-01 01:09:50 +08:00
__export(require('./plugins/ble'));
2015-11-30 11:55:18 +08:00
__export(require('./plugins/camera'));
2015-12-01 01:09:50 +08:00
__export(require('./plugins/contacts'));
2015-11-30 11:55:18 +08:00
__export(require('./plugins/device'));
__export(require('./plugins/statusbar'));
2015-11-29 06:24:38 +08:00
__export(require('./plugins/toast'));
2015-11-30 06:30:15 +08:00
var didFireReady = false;
window.addEventListener('deviceready', function () {
didFireReady = true;
});
setTimeout(function () {
2015-11-30 07:20:11 +08:00
if (!didFireReady && window.cordova) {
2015-11-30 06:30:15 +08:00
console.warn('Native: deviceready did not fire within ' + DEVICE_READY_TIMEOUT + 'ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.');
}
}, DEVICE_READY_TIMEOUT);