我如何防止凉亭下载整个仓库 [英] How I can prevent bower from downloading the whole repo

查看:91
本文介绍了我如何防止凉亭下载整个仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只需要.min文件,但它会下载整个仓库,而且很大。

I just need the .min files, but it downloads the whole repo and it's very big.

这是我的bower.json

This is my bower.json

{
"name": "blah",
"version": "0.0.0",
"dependencies": {
    "backbone": "~1.0.0",
    "underscore": "~1.4.4",
    "jquery": "~1.9.1",
    "backbone.localStorage": "~1.1.0",
    "bootstrap": "",
    "requirejs": "",
    "mustache": "",
    "hammerjs": ""
    }
}


推荐答案

鲍尔故意不考虑软件包的内容,因此它不会给您这种控制,它只是下载整个程序。

Bower is deliberately not opinionated about the content of packages, so it does not give you that kind of control, it just downloads the whole thing.

这样的想法是,您随后将使用构建系统或任务运行程序(例如 Grunt )来执行诸如缩小或编译作为第二步。

The idea is that you would then use a build system or task runner (such as Grunt) to perform tasks like minification or compilation as a second step.

这篇关于我如何防止凉亭下载整个仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆