From 6a75fa3a5dd2ac58811ddb3952c67c4ca593591b Mon Sep 17 00:00:00 2001 From: shopkeeperdev Date: Wed, 8 Oct 2025 12:07:00 -0400 Subject: [PATCH] Added support for Composer --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- composer.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 composer.json diff --git a/README.md b/README.md index f92acdf..af94a82 100644 --- a/README.md +++ b/README.md @@ -128,4 +128,51 @@ app/code/Shopkeeper/VendorNotes/ ## Support -For issues or questions, please contact your development team. \ No newline at end of file +For issues or questions, please contact your development team. + +## Installing via Composer + +You can install this module into a Magento 2 project using Composer in a few ways. + +1) Local path repository (during development) + +Add this to your Magento project's `composer.json` repositories section: + +```json +{ + "type": "path", + "url": "../path/to/VendorNotes", + "options": { "symlink": true } +} +``` + +Then require the package: + +```bash +composer require shopkeeper/module-vendor-notes:1.1.0 +``` + +2) VCS repository + +If this module is hosted in a Git repository (GitHub/GitLab/etc.), add a VCS entry to your project's `composer.json`: + +```json +{ + "type": "vcs", + "url": "git@github.com:shopkeeperdev/VendorNotes.git" +} +``` + +Then require it the same way: + +```bash +composer require shopkeeper/module-vendor-notes:dev-main +``` + +After installing, run these Magento commands from your project root: + +```bash +php bin/magento module:enable Shopkeeper_VendorNotes +php bin/magento setup:upgrade +php bin/magento cache:flush +``` diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..7c52dc4 --- /dev/null +++ b/composer.json @@ -0,0 +1,33 @@ +{ + "name": "shopkeeper/module-vendor-notes", + "description": "Magento 2 module that adds vendor notes to orders", + "type": "magento2-module", + "license": "MIT", + "version": "1.1.0", + "require": { + "php": ">=7.1", + "magento/framework": "*" + }, + "autoload": { + "psr-4": { + "Shopkeeper\\VendorNotes\\": "" + }, + "files": [ + "registration.php" + ] + }, + "authors": [ + { + "name": "Shopkeeper Dev", + "email": "dev@example.com" + } + ], + "extra": { + "map": [ + [ + "", + "app/code/Shopkeeper/VendorNotes" + ] + ] + } +}