From 577a7e36263cd42e306a2c4b0759932da415afae Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 8 Apr 2020 09:48:32 +0200 Subject: [PATCH] Add an example using type:* syntax --- ...all-a-package-to-a-custom-path-for-my-framework.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md b/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md index a81db4799..6cfaf3001 100644 --- a/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md +++ b/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md @@ -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