问题
I added jquery and jqueryui to composer.json:
"require": {
...
"components/jquery": "1.11.*@dev",
"components/jqueryui": "1.10.4"
}
and composer is downloading both libraries and puts them into vendor/components but also into components/, so I've got two copies of these libs. How can I rid off components/ directory?
回答1:
You can specify the component's output-directory with the component-dir
directive in your composer.json's
config` section.
example:
{
"require": {
"components/jquery": "~1.10"
},
"config": {
"component-dir": "web/assets"
}
}
It defaults to components
.
Just set it to /tmp
to "disable" dumping to the second directoy.
Edit: Sadly composer refuses to accept setting the target to /dev/null
.
Read more about the configuration in the component-installer documentation.
来源:https://stackoverflow.com/questions/21998144/composer-in-symfony2-creates-the-same-assets-twice-jquery-jqueryui