是否可以仅在Composer中获取/dist? [英] Is it possible to get /dist only in Composer?
问题描述
我也想使用composer来管理我的前端依赖项.不幸的是,使用"bower-asset/bootstrap":"dev-master"
或"twbs/bootstrap":"dev-master"
会带来80 MB以上的代码,而我只需要整个引导文件夹中的/dist/.
I'd like to use composer for managing my front-end dependencies as well.
Unfortunately, using "bower-asset/bootstrap": "dev-master"
or "twbs/bootstrap": "dev-master"
brings more than 80 MB of code, while I need only /dist/ from the whole bootstrap folder.
是否可以使用依赖管理器将引导程序的/dist/添加到我的应用程序中?
Is it possible to add only /dist/ of bootstrap to my application using dependency manager?
推荐答案
您可以使用作曲家fxp-asset插件忽略文件.
You can ignore files with the composer fxp-asset plugin.
例如,如果只需要bootstrap的 dist 文件夹,则将这些行添加到composer.json中:
For instance, if want only the dist folder of bootstrap, add these lines in your composer.json :
"config": {
"process-timeout": 1800,
"fxp-asset":{
"ignore-files": {
"bower-asset/bootstrap": [
"!dist",
"*"
]
}
}
}
这篇关于是否可以仅在Composer中获取/dist?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!