运行bower时,属性主文件的用途是什么?我一直在寻找,许多人说,它目前没有任何目的。
这是真的吗?鲍尔的文件也解释不了这一点。
发布于 2014-01-21 18:25:37
main 推荐的类型:更好的字符串或更高级的字符串阵列 使用包所需的主要代理文件。虽然Bower不直接使用这些文件,但是列出了命令--json和bower列表--路径,这样构建工具就可以使用它们。 像CoffeeScript这样的预处理文件应该是compiled.Do (不包括小型化files.Filenames ),不应该进行版本化(Bad: package.1.1.0.js;Good: package.js)。
我认为它更适合包管理,并构建像Grunt和Brunch这样的工具。例如,Bootstrap的bower.json如下所示:
{
  "name": "bootstrap",
  "version": "3.0.3",
  "main": [
    "./dist/css/bootstrap.css",
    "./dist/js/bootstrap.js",
    "./dist/fonts/glyphicons-halflings-regular.eot",
    "./dist/fonts/glyphicons-halflings-regular.svg",
    "./dist/fonts/glyphicons-halflings-regular.ttf",
    "./dist/fonts/glyphicons-halflings-regular.woff"
  ],
  "ignore": [
    "**/.*",
    "_config.yml",
    "CNAME",
    "composer.json",
    "CONTRIBUTING.md",
    "docs",
    "js/tests"
  ],
  "dependencies": {
    "jquery": ">= 1.9.0"
  }
}当我在Brunch构建时,它会从我的bower_components文件夹中的public文件夹中提取这些文件。
https://stackoverflow.com/questions/20391742
复制相似问题