[英]Should I still use Jammit on Rails 3.1?
I've used jammit to do my asset packaging so far, but my next application will be in Rails 3.1 到目前为止,我已经使用jammit进行资产打包,但是我的下一个应用程序将是Rails 3.1
Should/Can I still use Jammit? 我应该还是可以继续使用Jammit? Or should I work with the built-in asset pipeline?
还是应该使用内置资产管道?
You can still use Jammit, but the built in asset pipeline is The Rails Way™. 您仍然可以使用Jammit,但是内置的资产管道是The Rails Way™。
I'd recommend you try out the asset pipeline/Sprockets - if you don't like it, it's as simple as moving the javascript and css files back to the public directory and setting up Jammit the old way. 我建议您尝试一下资产管道/链轮-如果您不喜欢它,就像将javascript和css文件移回公共目录并以旧方法设置Jammit一样简单。
I found that setting up the asset pipeline the first time around for browser specific css was a little non-intuitive, but, that was just me being unfamiliar with the whole process. 我发现第一次为特定于浏览器的CSS设置资产管道有点不直观,但这只是我对整个过程不熟悉。 Sprockets works well and allows you to use ERB/HAML with your coffee script or sass (if you want.)
链轮效果很好,并允许您将ERB / HAML与您的咖啡脚本或无聊使用(如果需要)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.