1
0
Fork 0

Reword custom directory FAQ

pull/1016/head
Kyle Robinson Young 2012-08-20 09:53:47 -07:00
parent ab38ee3187
commit 404c944adc
1 changed files with 13 additions and 11 deletions

View File

@ -1,10 +1,9 @@
# How do I install a package in a custom directory? # How do I install a package to a custom path for my framework?
Composer can be configured to install packages to a folder other than the Each framework may have one or many different required package installation
default `vendor` folder. A simple way is to use the paths. Composer can be configured to install packages to a folder other than
[composer/installers](https://github.com/composer/installers) package and if the default `vendor` folder by using
you are using a framework, chances are a custom directory has been already [composer/installers](https://github.com/composer/installers).
configured for you.
If you are a **package author** and want your package installed to a custom If you are a **package author** and want your package installed to a custom
directory, simply require `composer/installers` and set the appropriate `type`. directory, simply require `composer/installers` and set the appropriate `type`.
@ -25,11 +24,11 @@ Now when your theme is installed with Composer it will be placed into
[current supported types](https://github.com/composer/installers#current-supported-types) [current supported types](https://github.com/composer/installers#current-supported-types)
for your package. for your package.
As a **package consumer** you can set or override the install path for each As a **package consumer** you can set or override the install path for a package
package with the `installer-paths` extra. A useful example would be for a that requires composer/installers by configuring the `installer-paths` extra. A
Drupal multisite setup where the package should be installed into your sites useful example would be for a Drupal multisite setup where the package should be
subdirectory. Here we are overriding the install path for a module that uses installed into your sites subdirectory. Here we are overriding the install path
composer/installers: for a module that uses composer/installers:
{ {
"extra": { "extra": {
@ -41,3 +40,6 @@ composer/installers:
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. composer/installers determined location.
> **Note:** You cannot use this to change the path of any package. This is only
> applicable to packages that require `composer/installers`.