简体   繁体   English

是否应该将现有的Jammit资产管道移植到新的Rails 3.1版本?

[英]Should I port my existing Jammit asset pipeline to the new Rails 3.1 version?

We've implemented Jammit for asset caching, compression and optimization in our Rails application. 我们已经在Rails应用程序中实现Jammit进行资产缓存,压缩和优化。 It's fully integrated with our continuous integration process and works well. 它已与我们的持续集成过程完全集成,并且运行良好。 That said, I am seeing 3.1 introduces a new canonical asset pipeline based on Sprockets. 也就是说,我看到3.1引入了一个基于Sprockets的新规范资产管道。

Are there advantages to the Sprocket based approach that would merit porting our system? 基于Sprocket的方法是否值得移植我们的系统? I do not want to spend time converting our system if there are no benefits. 如果没有好处,我不想花时间转换我们的系统。

I have already used Sprocket and Jammit and the main advantage of the Rails 3.1 approach is the complete and native integration of Sprocket, not the gem itself. 我已经使用过Sprocket和Jammit,并且Rails 3.1方法的主要优点是Sprocket的完全本地集成,而不是gem本身。 I'm not a specialist but both gems are great and, for me, equivalent. 我不是专家,但两颗宝石都很出色,对我而言,两者相当。

The rails 3.1 assets pipeline provide a clean architecture for js and css files and the native use of associated gems (sass, coffee-script, sprocket). Rails 3.1资产管道为js和css文件以及关联的gem(sass,coffee-script,sprocket)的本机使用提供了一种干净的体系结构。 If in your app you already have a clean tree for your files and a great integration of your gems, don't change anything ! 如果在您的应用中,您的文件已有一棵干净的树,并且与gem的集成度很高,请不要进行任何更改!

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

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