Rails 3-资产管道-对我来说意味着什么? [英] Rails 3 - Asset Pipeline -- What does it mean to me?

查看:69
本文介绍了Rails 3-资产管道-对我来说意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力寻找有关新的Rails 3资产管道的任何真实文档.我知道有一个视频,但我不希望以这种格式观看一个小时的视频.我看了大约10分钟,却一无所知.

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.

那么,关于Rails 3资产管道,我需要了解什么?这对我以前的项目意味着什么,对我以后的项目意味着什么?

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?

推荐答案

这意味着您现在可以使用sasscoffeescript在单独的文件中编写CSS和javascript,并且它们将被编译为一个最后一个文件.

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.

如果愿意,可以将assets/stylesheets上的4个css文件进行连接和压缩,并通过一个application.css文件在生产中交付.

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.

同样的内容适用于javascript文件.

Same thing applies to javascript files.

http://getsprockets.org/

这篇关于Rails 3-资产管道-对我来说意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆