Having a few issues here with composer and any help would be really appreciated.
I am working with a WP multi site ( it's actually VIP ) but his makes no difference.
I have a composer.json file in the root of wp-content
My requirement is that i use composer to install a plugin from a remote repo and locating in wp-content/plugins. This in it's self i have managed to do defining my plugin as a vcs as below
"repositories":[
{
"type": "vcs",
"url": "https://github.com/newsuk/nuk-wp-okta-plugin.git"
}
],
In addition i am using "composer/installers": "~1.0" a relocating the plugin as below
"extra": {
"installer-paths": {
"plugins/nuk-wp-okta-plugin": [
"newsuk/nuk-wp-okta-plugin"
]
}
}
However, although this is defined as a package, i have to be able to run the composer.json that exists in the root of the plugin/package and install the /vendor directory inside the plugin. Sharing the vendor directory throughout wp-content from root is not an option for reasons related to VIP config and deploy.
I have mupltiple requirements for this as well and so what i will want to end up with is something like
wp-content
plugins
nuk-wp-okta-plugin
composer.json
vendor/
plugin2
composer.json
vendor/
plugin3
composer.json
vendor/
I know this seems highly irregular but its a need to requirement and i additionally do NOT want to run composer install for every plugin on the build
So in short is there a way to install a package ( or something similar ) that will auto run inside the package directory the composer.json file and position the /vendor/ directory inside the directory rather than the root composer file.