2015-12-03 10:32:24 +08:00
|
|
|
# Be sure to restart your server when you modify this file.
|
|
|
|
|
|
|
|
# Version of your assets, change this if you want to expire all your assets.
|
|
|
|
Rails.application.config.assets.version = '1.0'
|
|
|
|
|
|
|
|
# Add additional assets to the asset load path
|
|
|
|
# Rails.application.config.assets.paths << Emoji.images_path
|
|
|
|
|
|
|
|
# Precompile additional assets.
|
|
|
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
|
|
|
# Rails.application.config.assets.precompile += %w( search.js )
|
2016-01-06 21:39:35 +08:00
|
|
|
# Rails.application.config.assets.paths << Rails.root.join('vendor', 'assets')
|
2015-12-14 05:19:12 +08:00
|
|
|
Rails.application.config.assets.precompile += %w( register.css *.png)
|
|
|
|
|
2016-01-06 21:39:35 +08:00
|
|
|
Rails.application.config.assets.precompile << Proc.new { |path|
|
2016-01-06 20:47:26 +08:00
|
|
|
# if path =~ /\.(css|js|png)\z/
|
|
|
|
# full_path = Rails.application.assets.resolve(path).to_path
|
|
|
|
# app_assets_path = Rails.root.join('app', 'assets').to_path
|
|
|
|
# vendor_assets_path = Rails.root.join('vendor', 'assets').to_path
|
|
|
|
# if full_path.starts_with? app_assets_path or full_path.starts_with? vendor_assets_path
|
|
|
|
# puts "including asset: " + full_path
|
|
|
|
# true
|
|
|
|
# else
|
|
|
|
# puts "excluding asset: " + full_path
|
|
|
|
# false
|
|
|
|
# end
|
|
|
|
# else
|
|
|
|
# false
|
|
|
|
# end
|
2016-01-06 21:39:35 +08:00
|
|
|
}
|