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

hexawing · June 19, 2016 · Last by hexawing replied at June 20, 2016 · 1721 hits

看到一篇文章

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

You need to Sign in before reply, if you don't have an account, please Sign up first.