简体   繁体   English

分期分析咖啡来源图(已废除)

[英]Coffee source maps on staging (uglified)

Is there any way to get source maps for uglified JS in Rails 3? 有什么办法可以在Rails 3中获取丑化的 JS的源映射?

I am currently using code from https://github.com/markbates/coffee-rails-source-maps and that works great for development, but after turning on assets precompilation and (most importantly) uglifying and turning debug assets off, it won't work (since it's not designed to). 我目前正在使用来自https://github.com/markbates/coffee-rails-source-maps的代码,该代码非常适合开发,但是在打开资产预编译功能(最重要的是)丑陋并关闭调试资产后,它赢得了不起作用(因为它并非旨在)。

Uglifier seems to support source maps, and the new coffee-script-source supports source maps also. Uglifier似乎支持源地图,新的coffee-script-source也支持源地图。 I've tried hacking around sprockets a bit but I wasn't able to find a solution. 我曾尝试过对链轮进行黑客攻击,但找不到解决方案。

So basically what I have is *.coffee -> *.js -> application.js (uglified), I want to at least get back to the javascript source (un-unglified), but ideally of course to get back to the coffeescript. 所以基本上我所拥有的是* .coffee-> * .js-> application.js(uglified),我至少要回到javascript来源(un-ungluified),但是理想情况下当然要回到coffeescript 。

Is this possible in Rails 3? Rails 3有可能吗? With any monkey-patching or anything that is necessary. 进行任何猴子修补或任何必要的操作。

Indeed, there is some ongoing work to make this all work together with the asset pipeline, but it's not done yet. 确实,有一些正在进行的工作可以使所有这些工作与资产管道一起工作,但是尚未完成。 See this pull request for more info. 有关更多信息,请参见此请求请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM