【问题标题】:What is wrong with my bower.json file?我的 bower.json 文件有什么问题?
【发布时间】:2013-12-19 00:14:37
【问题描述】:

我最近将以下 bower 文件添加到 visualsearch 项目中:

{
  "name": "visualsearch",
  "version": "0.4.0",
  "homepage": "http://documentcloud.github.io/visualsearch/",
  "authors": [
    "Samuel Clay"
    "@samuelclay"
  ],
  "description": "A Rich Search Box for Real Data",
  "main": ["build-min/visualsearch-datauri.css", "build-min/visualsearch.css", "build-min/visualsearch.js"],
  "license": "MIT",
  "dependencies": {
    "jQuery": ">=1.4",
    "jquery-ui": ">=1.8",
    "backbone": "0.9.10",
    "underscore":"1.4.3"
  },
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests",
    "Rakefile",
   "vendor",
    "*.html",
    "build",
    "docs",
    "*.yml"
  ]
}

Visualsearch 已添加到 bower 注册表中:

凉亭注册视觉搜索https://github.com/documentcloud/visualsearch.git

但是当我跑步时:

bower install visualsearch --save

视觉搜索已下载到我的“bower_components”目录中,但主干和下划线并未作为依赖项添加到我的项目 bower 文件中。

【问题讨论】:

  • 对这些使用 json 验证器.. 不是 stackoverflow

标签: yeoman bower


【解决方案1】:

这里需要在数组元素之间加逗号:

"authors": [
    "Samuel Clay",
    "@samuelclay"
  ]

您可以在此站点轻松检查任何 json:http://www.jsoneditoronline.org/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-21
    • 2014-09-04
    • 1970-01-01
    相关资源
    最近更新 更多