couchapp不会生成loader.js

时间:2012-02-14 03:50:16

标签: jquery couchdb couchapp

我正在尝试使用 couchapp 来管理我的CouchDB应用程序,但是在生成项目loader.js之后它缺少一个关键文件。看起来这是existing issue(过去6个月),而couchapp团队尚未解决。

我首先尝试upgrade the vendor folder,但这不起作用:

couchapp vendor update git://github.com/couchapp/vendor.git
2012-02-13 22:57:50 [CRITICAL] vendor `git://github.com/couchapp/vendor.git` doesn't exist

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/couchapp/dispatch.py", line 48, in dispatch
    return _dispatch(args)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/dispatch.py", line 92, in _dispatch
    return fun(conf, conf.app_dir, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/commands.py", line 294, in vendor
    vendor_update(conf, dest, vendorname, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/vendors/__init__.py", line 14, in vendor_update
    vendor.update(dest, name, *args, **opts)
  File "/usr/local/lib/python2.7/dist-packages/couchapp/vendors/base.py", line 139, in update
    raise VendorError("vendor `%s` doesn't exist" % name)
VendorError: vendor `git://github.com/couchapp/vendor.git` doesn't exist

然后我尝试将loader.js文件复制到vendor/couchapp/_attachments,但这也不起作用。

是否有人有解决方法允许loader.js正常运作?

1 个答案:

答案 0 :(得分:0)

loader.js似乎是从couchapp弃用的。相反,显式调用您需要的每个脚本。

<script src="/_utils/script/sha1.js"></script>
<script src="/_utils/script/json2.js"></script>
<script src="/_utils/script/jquery.js"></script>
<script src="/_utils/script/jquery.couch.js"></script>
<script src="vendor/couchapp/jquery.couchLogin.js"></script>
<script src="vendor/couchapp/jquery.couchProfile.js"></script>
<script src="vendor/couchapp/md5.js"></script>
<script src="vendor/couchapp/jquery.mustache.js"></script>