Add an example using type:* syntax
parent
a47f44bc61
commit
577a7e3626
|
@ -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
|
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
|
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
|
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
|
```json
|
||||||
{
|
{
|
||||||
"extra": {
|
"extra": {
|
||||||
"installer-paths": {
|
"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
|
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
|
composer/installers determined location. In addition, `installer-paths` is
|
||||||
should come before the installer path of a `type` that matches the same package.
|
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
|
> **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
|
> applicable to packages that require `composer/installers` and use a custom type
|
||||||
|
|
Loading…
Reference in New Issue