Reputation: 108
I know that you can change the vendor directory by using
"config": {
"vendor-dir": "customdir"
}
But this changes the directory for all packages. How can I change the directory for custom composer types?
Upvotes: 1
Views: 194
Reputation: 2607
You can use this composer package: Composer Custom Type Installer. Any custom type can be used to define a path the type should be installed in.
Got this example from the github about how to use it:
{
"extra": {
"custom-installer": {
"web/": ["type:drupal-core"],
"web/sites/{$name}/": ["type:drupal-site"],
"custom/{$type}/{$vendor}/{$name}/": ["type:random-type"],
"vendor/{$vendor}/{$name}/": ["type:library"],
"web/sites/all/libraries/{$name}/": [
"type:component",
"ckeditor/ckeditor",
"flesler/jquery.scrollto"
],
"custom-folder-for-single-package": ["myvendorname/single-package"],
}
}
}
Upvotes: 1