有人在这方面取得过成功吗?
Has any one had any success with this?
我认为这或多或少是一个未解决的问题:https://github.com/jashkenas/coffee-script/issues/2779 .最后一个有意义的评论来自一个月前的 jwalton.
I think it's more or less an unsolved problem: https://github.com/jashkenas/coffee-script/issues/2779 . Last meanigingful comment was from jwalton, a month ago.
不过,增加对它的支持似乎不是火箭科学,所以它可能很快就会到来.
Still, it doesn't seem rocket science to add support for it, so it will probably come soon.
Michael Ficarra(CoffeeScript Redux 的创建者)建议使用 https://github.com/michaelficarra/commonjs- 无处不在 .
Michael Ficarra (creator of CoffeeScript Redux) suggested using https://github.com/michaelficarra/commonjs-everywhere .
两个警告:
所以这不适用于您特别要求的连接".
So this does not work for what you ask for specifically, "concatenation".
您可能会很幸运:combine-source-map 和/或generate-sourcemap,均出自同一作者.
You might have luck with these: combine-source-map and/or generate-sourcemap, both by same author.
这看起来很简单:https://npmjs.org/package/mapcat.您只需将咖啡编译器生成的各个源映射文件提供给它.
This looks really simple: https://npmjs.org/package/mapcat . You just have to feed it the individual source map files generated by the coffee compiler.
Mariusz Nowak 刚刚发布 webmake-coffee.与 CommonJS Everywhere 一样,它需要将代码组织为 CommonJS 模块.与其他地方的 CommonJS 不同,它使用常规的 CoffeeScript.
Mariusz Nowak has just released webmake-coffee. Like CommonJS Everywhere, it requires code to be organized as CommonJS modules. Unlike CommonJS everywhere, it uses regular CoffeeScript.
Grunt Coffee-Script 插件 似乎也有源映射支持连接文件很长一段时间(两个月),有效地证明我原来的答案是不正确的.
It also seems the Grunt Coffee-Script plugin has had source-map support for concatenated files for quite a while (two months), effectively proving my original answer to be incorrect.
即将推出的 Snockets 2.0 版也将支持它.
The upcoming version 2.0 of Snockets will have support for it too.
这篇关于为从 Coffeescript 编译的多个连接的 javascript 文件生成源映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
即使在调用 abort (jQuery) 之后,浏览器也会等待Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在调用 abort (jQuery) 之后,浏览器也会等待 ajax 调用
JavaScript innerHTML 不适用于 IE?JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不适用于 IE?)
XMLHttpRequest 无法加载,请求的资源上不存在“AXMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 无法加载,请求的资
XHR HEAD 请求是否有可能不遵循重定向 (301 302)Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 请求是否有可能不遵循重定向 (301 302))
XMLHttpRequest 206 部分内容XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分内容)
XMLHttpRequest 的 getResponseHeader() 的限制?Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)