Moox Devlink is used to link packages a monorepo into any project and to deploy a production-ready composer.json. That allows us to develop Moox packages in any project. It runs on MacOS and Linux, Windows with special configuration.
composer require moox/devlink
php artisan vendor:publish --tag="devlink-config"- Prepare your project's
.gitignorefile:
# Devlink
# ignore symlinks in packages/
packages/*
!packages/**/
!packages/*/.gitkeep
# and for windows
/packageslocal/*
# optional:
composer.json-deploy
-
Configure your paths and packages in the
config/devlink.phpfile and change the package path in the.envfile, if needed (Windows users should set theDEVLINK_PACKAGES_PATHvariable topackageslocal). -
When running
php init.php- Creates a
.envfile from.env.example - Copies
composer.json-linkedtocomposer.json - Runs
composer update
- Creates a
-
When running
moox:devstatus:- Shows the configuration and status of each package
- Shows the link status (Linked, Unlinked, Deployed)
- Shows the update status (Up-to-date, Outdated)
- Has a verbose mode
-vto show more information
-
When running
moox:devlink:- Creates the packages folder, if it does not exist
- Creates symlinks for all configured packages
- Updates composer.json with development configuration
- Creates composer.json-linked for production use
- Asks to run
composer install - Asks to run
php artisan optimize:clear - Asks to run
php artisan queue:restart
-
When running
moox:deploy:- Removes all symlinks
- Deletes the packages folder, if empty
- Restores production-ready composer.json from composer.json-linked
- Asks to run
composer install - Asks to run
php artisan optimize:clear - Asks to run
php artisan queue:restart
-
CI Safety Net -
deploy.sh:- If composer.json-linked exists in the repository:
- Remove all symlinks from /packages
- rename composer.json-linked to composer.json
- Commit and push the change in your GitHub Action
- If composer.json-linked exists in the repository:
Mac and Linux work out of the box. You can have local packages mixed with the symlinked packages in your /packages folder.
On Windows there are most probably some issues with ignoring symlinks. If you run into issues, you can either globally or project-wise disable the symlinks or do the following:
DEVLINK_PACKAGES_PATH=packageslocalDevlink will then link the packages into the packageslocal folder instead of mixing them into packages.
Please see the CLASSES.md file for a quick class overview.
Please see the ROADMAP.md file for what is planned.
Please see the CHANGELOG.md file for what has changed.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.




