部署 请教,.json 或者.xml 这样的文件,production 模式下应该如何加载?

hexawing · 2016年06月19日 · 最后由 hexawing 回复于 2016年06月20日 · 1730 次阅读

看到一篇文章

It’s important to organize your assets in a way that is understandable to you, and facilitates the existing functionality of the asset pipeline. The first thing you should know is that all of your custom Javascript, stylesheets, and images should go in the app/assets/ directory. By default, there is a folder each for javascripts, stylesheets, and images. You can also add fonts, audios, and videos to the app/assets/ directory for those types of assets. All third-party code that you are using (e.g. jQuery, backbone.js, etc.) should be placed in the vendor/assets/ directory:

然后查了下,只能是fonts, audios, videos,加上原来的images javascripts stylesheets一共六种?

# Maps asset types to public directory.
ASSET_PUBLIC_DIRECTORIES = {
  audio:      '/audios',
  font:       '/fonts',
  image:      '/images',
  javascript: '/javascripts',
  stylesheet: '/stylesheets',
  video:      '/videos'
}

那如果有别的文件类型要怎么加载到 assets 里呢?

直接放 public 里面

#1 楼 @xworm 直接放了,但 production 模式下好像找不到……我再研究研究 T_T

需要 登录 后方可回复, 如果你还没有账号请 注册新账号