couchapp 不生成 loader.js
Posted
技术标签:
【中文标题】couchapp 不生成 loader.js【英文标题】:couchapp does not generate loader.js 【发布时间】:2012-02-14 03:50:16 【问题描述】:我正在尝试使用 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】: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>
【讨论】:
以上是关于couchapp 不生成 loader.js的主要内容,如果未能解决你的问题,请参考以下文章
沙发应用程序不起作用! (node.couchapp.js)
Couchapp && Evently && Mustache:我将如何输出子数组?
couchapp+evently: _init/data.js 和 $$(this)