Follow these steps to develop a Compass module locally.
For example:
mkdir packages
git clone git@github.com:noardcode/compass-ecommerce.git packages/noardcode/ecommerce
composer.jsonAt the top of the repositories section, add:
{
"type": "path",
"url": "packages/noardcode/ecommerce",
"options": {
"symlink": true
}
}
Run the following command to link the local package:
composer update noardcode/compass-ecommerce
git checkout -b feature/your-feature-name
Make your changes locally. Your changes will be immediately reflected thanks to the symlink.
git add .
git commit -m "Describe your changes"
git push origin feature/your-feature-name
Merge your feature branch into the target branch (e.g., main, develop, etc.).
composer.jsonRemove the path repository entry you added earlier.
Switch back to using the package from the source repository:
composer update noardcode/compass-ecommerce
✅ You're done!