Rails 3 - Asset Pipeline — What does it mean to me?

家住魔仙堡 提交于 2019-12-09 15:59:08

问题


I am struggling to find any real documentation on the new Rails 3 asset pipeline. I know there is a video, but I do not wish to watch an hour video in this format. I watched about 10 minutes and gained no knowledge.

So, what do I need to know about Rails 3 asset pipelines? What does this mean to my previous projects, and what does it mean to my future projects?


回答1:


It means you will now be able to write css and javascript in separate files using sass and coffeescript if you want and they will be compiled into one single file in the end.

If you have like, 4 css files on your assets/stylesheets they will be concatenated and compressed and delivered on production with a single application.css file.

Same thing applies to javascript files.

More info in http://getsprockets.org/




回答2:


You can get some good documentation here on rails guides here

http://edgeguides.rubyonrails.org/asset_pipeline.html

It's a great way to serve fast assets for your application. Sprockets is playing a major role in it.



来源:https://stackoverflow.com/questions/6244275/rails-3-asset-pipeline-what-does-it-mean-to-me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!