Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i change to location where composer creates the vendor folder

I have project's folder dummyProject and inside of it two folders, src and test, and composer.json file. Problem is when i run the composer install command the vendor folder being created in the dummyProject folder. How can i tell composer to create the vendor folder inside src?? thx..

like image 741
Donoven Rally Avatar asked Jul 20 '15 13:07

Donoven Rally


1 Answers

According to the following: https://groups.google.com/forum/#!topic/composer-dev/CS_I0FNMHwY

You can set a Vendor Path like so:

{ 
  "config": { 
    "vendor-dir": "libs/" 
  } 
} 

Looking at this question How to get multiple vendor directories with composer?, it appears you cannot set two different paths for vendor files (not sure if you will need to do this also), but the questions shows that with a symlnk this can be achieved.

Also see the following regarding changing the vendor location: How to specify Composer install path?

like image 124
The Humble Rat Avatar answered Sep 28 '22 07:09

The Humble Rat