소스 검색

Add an example using type:* syntax

Jordi Boggiano 5 년 전
부모
커밋
577a7e3626
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md

+ 7 - 4
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
 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 
- 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
 > **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