简体   繁体   English

我仍然应该在Rails 3.1上使用Jammit吗?

[英]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.

相关问题 是否应该将现有的Jammit资产管道移植到新的Rails 3.1版本? - Should I port my existing Jammit asset pipeline to the new Rails 3.1 version? Rails 4和Jammit路由问题-不应使用匹配 - Rails 4 and Jammit routing issue - should not use match 我应该在Rails 3.1项目中使用什么JSON gem? - What JSON gem should I use in a Rails 3.1 project? Rails + Heroku + Jammit - Rails + Heroku + Jammit 带有Jammit和Rails 2.3的车把 - Handlebars with Jammit and Rails 2.3 Rails 3.1 Asset Pipeline-为什么我应该在SCSS文件中使用Asset Helpers? - Rails 3.1 Asset Pipeline - Why should I use the Asset Helpers in a SCSS file? 在Rails 3.1中,我应该在哪个文件夹中放置jquery库? - In Rails 3.1, in which folder should I place the jquery library? 我应该在哪里放置模型访问的功能? - Rails 3.1 - Where should I put functions that are accessed by models? — Rails 3.1 带有jQuery的Rails 3中的prototype_helpers-我是否仍应使用jrails插件? 还是现在有其他方法? - prototype_helpers in rails 3 with jquery - should i still use the jrails plugin? or is there a different way now? 在使用Rails 5.1的纱线时,我还应该使用Gemfile的javascript库吗? - Should I still use Gemfile's javascript library when using yarn with Rails 5.1?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM