rake assets:precompile 和 rake assets:clobber 的区别 [英] Difference between rake assets:precompile and rake assets:clobber

查看:41
本文介绍了rake assets:precompile 和 rake assets:clobber 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我 rake assets:precompile 和 rake assets:clobber 之间的区别.真的是一个很大的困惑.

Can anyone please tell me the difference between rake assets:precompile and rake assets:clobber. really its a great confusion.

推荐答案

您可以使用 rake assets:precompile 预编译 app/assets 中的资产,并使用 rake assets 删除旧的编译资产:clean.rake assets:clean 任务允许滚动部署,在构建新资产时,这些部署可能仍然链接到旧资产.如果你想彻底清除public/assets,可以使用rake assets:clobber.

You can precompile the assets in app/assets using rake assets:precompile, and remove older compiled assets using rake assets:clean. The rake assets:clean task allows for rolling deploys that may still be linking to an old asset while the new assets are being built. If you want to clear public/assets completely, you can use rake assets:clobber.

rake assets:clean # 删除旧的编译资源

rake assets:clobber # 删除编译的资源

rake assets:precompile # 编译 config.assets.precompile 中命名的所有资源

这篇关于rake assets:precompile 和 rake assets:clobber 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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