Reputation: 9472
I am currently using composer dependency manager for zendframework 2 along with twitter bootstrap , I able to successfully manage zendframework 2 but I am not able manage twitter bootstrap via composer .
The problem is composer downloads twitter bootstrap library to vender directory . This is not feasible I need composer to download twitter bootstrap to public folder and zendframework to vender folder . how to achieve this
Below is the current composer.json file that I am using .
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*",
"twitter/bootstrap":"2.*"
},
"extra": {
"installer-paths": {
"public/bootstrap/": ["twitter/bootstrap", "twitter/bootstrap"],
"vender/zendframework" : ["zendframework/zendframework" ,"zendframework/zendframework"]
}
}
}
I am new to composer Please kindly suggest correct way of specifying path for each required library in composer.json file ,
The above code is throwing error as invalid format .
Upvotes: 0
Views: 2221
Reputation: 9472
After trying every approach I posted the issue on github composer repository , Below is the link
Setup Zendframework 2 and twitter bootstrap using Composer
@Seldaek have closed the issue , by responding to that issue , As per his comments
Composer is not made to download front end dependencies at the moment. His suggested solution to manage twitter bootstrap is to use Bower a Browser package manager from twitter .
Bower is also a good tool to use for managing all sort of front end packages and keep it up to date in your project, . I tried and I was successful in managing twitter boot strap and other JS libraries .
I just decided to post this to help others who are also searching solution for the same problem ,
This posting definitely helps others to decide on process to follow for managing front end libraries in projects .
Upvotes: 1
Reputation: 12809
You need a custom installer to install to a different path
http://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md
http://getcomposer.org/doc/articles/custom-installers.md
Upvotes: 1