【发布时间】:2013-01-25 17:15:24
【问题描述】:
我正在使用curl 或require(同时评估两者)来异步加载js 文件。我在原型应用程序中使用了 5 个 js 文件:
jquery.min.js // off of CDN
Bacon.js // reactive programming tool
curl.js // js loader
index.coffee // page specific
foo.coffee // app specific
好的,所以我构建了 index.coffee 和 foo.coffee,所以我很确定它们不兼容 AMD。不过可能是错的,因为foo.coffee 有
if module? && module.exports?
module.exports = Foo
最后。
如何查看 js 文件并说“是的,AMD”或“不,不是 AMD”?
【问题讨论】:
-
您所说的 AMD 是指 Advanced Micro Devices 吗? CPU制造商?
-
@SteveWellens 异步模块定义
-
@SteveWellens 标签 wiki 在这种情况下会有所帮助。
-
+1 用于尝试 CurlJS。不知何故,在过去 2 年使用 AMD 模式的过程中,我完全迁移到了 CurlJS。 RequireJS 是 1.x 倍的(加载时间)混乱。
-
嘿 jcollum,试试 AMDjs 标签而不是 AMD。 :)
标签: javascript jquery asynchronous amd curl.js