Sha256: d312856b8a5a33cda8ea5e5c1dbca134ce1ae0bf53d4e1550c81c5830e1d2a3c
Contents?: true
Size: 1.03 KB
Versions: 5
Compression:
Stored size: 1.03 KB
Contents
class Converter module JsConversion def process_javascript_assets log_status 'Processing javascripts...' save_to = @save_to[:js] read_files('js', bootstrap_js_files).each do |name, file| save_file("#{save_to}/#{name}", file) end log_processed "#{bootstrap_js_files * ' '}" log_status 'Updating javascript manifest' content = '' bootstrap_js_files.each do |name| name = name.gsub(/\.js$/, '') content << "//= require bootstrap/#{name}\n" end path = 'vendor/assets/javascripts/bootstrap.js' save_file(path, content) log_processed path end def bootstrap_js_files @bootstrap_js_files ||= begin files = get_paths_by_type 'js', /\.js$/ files.sort_by { |f| case f # tooltip depends on popover and must be loaded earlier when /tooltip/ then 1 when /popover/ then 2 else 0 end } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems