The extra section instructs composer on where to move the packages once downloaded.
If this you’re downloading is a plugin for WordPress, the correct spot for it would be the plugins
folder more than the theme
. That’s the reason why I put it into the type:wordpress-plugins
section.
Also, it’s important for you to know that even if it ends up being in your vendor
folder, composer
will autoload it for you. So the class and functions of this library will still be available to you when you’re developing, regardless of it’s position.
I had a look at this library and the guy didn’t properly publish any tag nor package type.
This is the configuration I used to install the plugin in the plugins
folder anyway, for your reference:
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "A modern WordPress stack",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw@gmail.com",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "Ben Word",
"email": "ben@benword.com",
"homepage": "https://github.com/retlehs"
}
],
"keywords": [
"bedrock","roots","wordpress","stack","composer","vagrant","wp"
],
"support": {
"issues": "https://github.com/roots/bedrock/issues",
"forum": "https://discourse.roots.io/category/bedrock"
},
"config": {
"preferred-install": "dist"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "syamilmj/aqua-resizer",
"type": "wordpress-plugin",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/syamilmj/Aqua-Resizer",
"reference": "master"
}
}
}
],
"require": {
"php": ">=5.6",
"composer/composer": "~1.0.0@dev",
"composer/installers": "~1.0.25",
"vlucas/phpdotenv": "^2.0.1",
"johnpbloch/wordpress": "~4.5",
"oscarotero/env": "^1.0",
"wp-cli/wp-cli": "~0.23",
"roots/soil": "^3.6.2",
"roots/wp-h5bp-htaccess": "^2.0.1",
"roots/wp-password-bcrypt": "*",
"syamilmj/aqua-resizer": "dev-master"
},
"extra": {
"installer-paths": {
"web/app/mu-plugins/{$name}/": [
"type:wordpress-muplugin",
"roots/soil",
"roots/wp-h5bp-htaccess"
],
"web/app/plugins/{$name}/": [ "type:wordpress-plugin" ],
"web/app/themes/{$name}/": [ "type:wordpress-theme" ]
},
"wordpress-install-dir": "web/wp"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.5.1"
},
"scripts": {
"test": [
"vendor/bin/phpcs --ignore=web/wp/,vendor/,web/app/ -n -s ."
]
}
}