我正在尝试将这个jQuery插件注册到Bower。
bower.json文件如下所示:
{
"name": "domajax",
"version": "2.1.0",
"homepage": "http://domajax.com",
"description": "Domajax is a free jQuery plugin that give you tools to add ajax calls within your application, without a piece of javascript.",
"main": [
"js/jquery.domajax.js"
],
"keywords": [
"domajax",
"ajax",
"jquery",
"plugin",
"javascript",
"dom",
"html"
],
"authors": [
"Alain Tiemblo"
],
"repository": {
"type": "git",
"url": "git://github.com/ninsuo/domajax.git"
},
"bugs": "https://github.com/ninsuo/domajax/issues",
"license": "MIT",
"ignore": ["./!(js/jquery.domajax.js)"],
"dependencies": {
"jquery": ">=1.7",
"jquery.ui": "*",
"json2-js": "*"
}
}
您可以看到,main和ignore条目都已设置,但当我将插件注册到Bower时,会收到以下警告:
bower domajax#* invalid-meta domajax is missing "main" entry in bower.json
bower domajax#* invalid-meta domajax is missing "ignore" entry in bower.json
为什么我的bower.json文件中那些条目被标记为缺失?
附带信息,这是完整输出:
ninsuo:domajax alain$ bower register domajax https://github.com/ninsuo/domajax
bower convert Converted https://github.com/ninsuo/domajax to git://github.com/ninsuo/domajax.git
bower domajax#* resolve git://github.com/ninsuo/domajax.git#*
bower domajax#* download https://github.com/ninsuo/domajax/archive/2.1.0.tar.gz
bower domajax#* extract archive.tar.gz
bower domajax#* invalid-meta domajax is missing "main" entry in bower.json
bower domajax#* invalid-meta domajax is missing "ignore" entry in bower.json
bower domajax#* resolved git://github.com/ninsuo/domajax.git#2.1.0
? Registering a package will make it installable via the registry (https://bower.herokuapp.com), continue?: No