I'm trying to use composer in Symfony 2.1 to pull down vendors from github libraries that are not composer aware and probably never will be.
For examples: Old Deps file:
[jQuery]
git=git://github.com/jquery/jquery.git
version=1.8.1
[Mocha]
git=https://github.com/visionmedia/mocha.git
Composer (doesn't work)
"repositories": [
{
"type": "package",
"package": {
"name": "jquery",
"version": "1.8.1",
"dist": {
"url": "git://github.com/jquery/jquery.git",
"type": "git"
}
}
}
],
"require": {
"jquery": "1.8.1"
}
If you are downloading from git, you need to specify a "source" package, not a "dist" package. Use:
"repositories": [
{
"type": "package",
"package": {
"name": "jquery",
"version": "1.8.1",
"source": {
"url": "git://github.com/jquery/jquery.git",
"type": "git",
"reference": "1.8.1"
}
}
}
],
"require": {
"jquery": "1.8.1"
}
Another option is to useBower
for front end package management and only use composer for what it was designed for. (PHP packages).
http://bower.io/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With