Add an example using type:* syntax

main
Jordi Boggiano 4 years ago
parent a47f44bc61
commit 577a7e3626
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -31,21 +31,24 @@ As a **package consumer** you can set or override the install path for a package
that requires composer/installers by configuring the `installer-paths` extra. A
useful example would be for a Drupal multisite setup where the package should be
installed into your sites subdirectory. Here we are overriding the install path
for a module that uses composer/installers:
for a module that uses composer/installers, as well as putting all packages of type
`drupal-theme` into a themes folder:
```json
{
"extra": {
"installer-paths": {
"sites/example.com/modules/{$name}": ["vendor/package"]
"sites/example.com/modules/{$name}": ["vendor/package"],
"sites/example.com/themes/{$name}": ["type:drupal-theme"]
}
}
}
```
Now the package would be installed to your folder location, rather than the default
composer/installers determined location. In addition, `installer-paths` is order-dependent, which means moving a package by name
should come before the installer path of a `type` that matches the same package.
composer/installers determined location. In addition, `installer-paths` is
order-dependent, which means moving a package by name should come before the installer
path of a `type:*` that matches the same package.
> **Note:** You cannot use this to change the path of any package. This is only
> applicable to packages that require `composer/installers` and use a custom type

Loading…
Cancel
Save