有没有办法获得bootstrap/css
,bootstrap/js
和bootstrap/fonts
?但是不介意包括jQuesry。包管理器真的很重要,只要我可以在任何我喜欢的地方安装它并在Mac上运行。
答案 0 :(得分:3)
使用composer
,您可以定义一个软件包存储库,并利用github的svn
支持来获取树的一部分。
{
"name": "slbmeh/bootstrap-deps",
"description": "An example to get only specific bootstrap files",
"repositories": [
{
"type": "package",
"package": {
"name": "slbmeh/bootstrap-css",
"version": "3.2.0",
"source": {
"type": "svn",
"url": "https://github.com/twbs/bootstrap",
"reference": "tags/v3.2.0/dist/css"
}
}
},
{
"type": "package",
"package": {
"name": "slbmeh/bootstrap-fonts",
"version": "3.2.0",
"source": {
"type": "svn",
"url": "https://github.com/twbs/bootstrap",
"reference": "tags/v3.2.0/dist/fonts"
}
}
},
{
"type": "package",
"package": {
"name": "slbmeh/bootstrap-js",
"version": "3.2.0",
"source": {
"type": "svn",
"url": "https://github.com/twbs/bootstrap",
"reference": "tags/v3.2.0/dist/js"
}
}
},
{
"type": "package",
"package": {
"name": "slbmeh/bootstrap-all",
"version": "3.2.0",
"source": {
"type": "svn",
"url": "https://github.com/twbs/bootstrap",
"reference": "tags/v3.2.0/dist"
}
}
}
],
"require": {
"slbmeh/bootstrap-all": "*",
"slbmeh/bootstrap-css": "*",
"slbmeh/bootstrap-fonts": "*",
"slbmeh/bootstrap-js": "*"
}
}
上面的composer.json为您提供了许多不同的选项来将软件包安装到供应商目录中。