diff --git a/src/plugins/cordova-plugin=barcodeScanner b/src/plugins/cordova-plugin=barcodeScanner new file mode 100644 index 0000000..2cfd6a9 --- /dev/null +++ b/src/plugins/cordova-plugin=barcodeScanner @@ -0,0 +1,15 @@ + +exports.install = function (Vue, options, cb) { + document.addEventListener('deviceready', () => { + + if (typeof cordova.plugins.barcodeScanner === 'undefined') { + return cb(false) + } + + // pass through the camera object + Vue.cordova.camera = cordova.plugins.barcodeScanner + + return cb(true) + + }, false) +}