Last active
January 4, 2019 15:58
-
-
Save PandelisZ/03ab98d52eb0ab29012f0a2d78360a06 to your computer and use it in GitHub Desktop.
Composer link command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
composer-link() { | |
jq '.repositories |= [{"type": "path", "url": "'$1'", "options": {"symlink": true}}] + . ' composer.json > composer.tmp.json && mv composer.tmp.json composer.json | |
packageName=$(jq -r '.name' $1/composer.json) | |
composer require $packageName @dev | |
} | |
composer-unlink() { | |
git checkout composer.json composer.lock | |
composer update | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment