Bower.json仅安装单个文件 [英] Bower.json install only single file

查看:93
本文介绍了Bower.json仅安装单个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是凉亭新手.如何从GitHub下载单个文件而不是整个文件?我只想从这里获取最新的fuelux.min.js文件( https://raw.githubusercontent.com/ExactTarget/fuelux/master/dist/js/fuelux.min.js ),我想将其放在我的插件目录中.

I am a bower newbie. How can I download only a single file from GitHub instead of the entire set of files? I just want the latest fuelux.min.js file from here (https://raw.githubusercontent.com/ExactTarget/fuelux/master/dist/js/fuelux.min.js) and I want to put it in my plugins directory.

{
  "name": "my app",
  "version": "1.0",
  "dependencies": {
    "angular-local-storage": "latest",
    "fuelux":"latest"
    },
  "install" : {
    "path" : {
      "js": "plugins"
      }
  }
}

推荐答案

bower的想法是,您包括存储库/包的全部已发布内容,然后由开发人员通过bower安装.您可以使用自己的构建系统(粗制,西兰花等)从需要包含在您自己的发行版中的文件中选择任何文件.

The idea of bower is that you include the entire published contents of the repository/package which is then installed by a developer through bower. You use your build system (grunt, broccoli, etc) to pick any files from that which need to be included in your own distribution.

如果出于某些原因您只想要单个文件,则只需手动将其包含在应用程序中即可.

If for some reason you really only want that single file you'll just have to include it in your application manually.

这篇关于Bower.json仅安装单个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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