I am developing QrCode Extension in Magento2 which is depended [bacon-qr-code] library so I need to download [bacon-qr-code] library using composer.In Magento2 in root composer.json if I add the
"require": {
"magento/module-offline-shipping-sample-data": "100.1.*",
"bacon/bacon-qr-code": "1.0.1.*"
},
Then it download in vendor folder and I am able to use but what if I provide my Extension to anyone, will he add this line to its main root
composer.json file ?? Or download the package manually I am little confuse
please suggest me.I followed this link but did not get clear suggestion.
1:- Magento2: How to include third pary module through composer.json in custom module
:-My Module composer.json file
{
"name": "Ktpl/Relatedprod",
"description": "N/A",
"require": {
"php": "~5.6.0|7.0.2|~7.0.6",
"magento/magento-composer-installer": "*",
"bacon/bacon-qr-code": "1.0.1.*"
},
"type": "magento2-module",
"version": "2.0.0",
"license": ["GPL-3.0"],
"autoload": {
"files": ["registration.php"],
"psr-4": {
"Ktpl\\Relatedprod\\": ""
}
}
}