Skip to content

Instantly share code, notes, and snippets.

@lauhakari
Created September 5, 2015 13:53
Show Gist options
  • Save lauhakari/9f50bf5cf74094192773 to your computer and use it in GitHub Desktop.
Save lauhakari/9f50bf5cf74094192773 to your computer and use it in GitHub Desktop.
Add Wordpress plugins to composer.json file, from custom Git-repo.
/** name: on the repo is what you call later down in the "require" section.
It does not necessarily need to be the repo user and repo name, but is good practice! :)
**/
{
"repositories": [
{
"type": "composer",
"url": "http://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "the-user/the-repo",
"version": "1.3.4",
"type": "wordpress-plugin",
"dist": {
"type": "zip",
"url": "https://github.com/the-user/the-repo/archive/master.zip"
},
"require" : {
"composer/installers": "v1.0.6"
}
}
}
],
"require": {
"php": ">=5.3.0",
"the-user/the-repo": "1.3.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment