You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

42 lines
1.6 KiB

# 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
# Add Yarn node_modules folder to the asset load path.
Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += Ckeditor.assets << /ckeditor\/lang\/.*.js/
assets_filter_precompile = lambda do |filename, path|
app_filters = [/(frameworks\/main|app|init|frameworks\/main.ckeditor|frameworks)\.(css|js)/, "frameworks/main.js"]
filters = [/.*\.woff/, /.*\.eot/, /.*\.svg/, /.*\.ttf/, /.*\.swf/]
# Assets to precompile in app/assets
precompile = path =~ /app\/assets/ && app_filters.concat(filters).any? do |filter|
if filter.is_a?(Regexp)
filter.match(filename)
else
File.fnmatch(filter.to_s, filename)
end
end
# Assets to precompile for not under in app/assets
# Skip if +precompile+ is `true`
precompile = !(path =~ /app\/assets/) && filters.any? do |filter|
if filter.is_a?(Regexp)
filter.match(filename)
else
File.fnmatch(filter.to_s, filename)
end
end unless precompile
precompile
end
Rails.application.config.assets.precompile += [assets_filter_precompile]
Rails.application.config.assets.precompile += %w(ckeditor/*)