Sha256: ff2627da7ea8754b8d4ab06c27b6a5e5617e5e7423e56533d1d04b8736ecbf40
Contents?: true
Size: 754 Bytes
Versions: 11
Compression:
Stored size: 754 Bytes
Contents
require "appetizer/rake" # For Heroku. task "assets:precompile" => :compile desc "Compile the app's CSS and JS files." task :compile => :init do ENV["APPETIZER_MINIFY_ASSETS"] = "true" require "appetizer/ui/assets" require "fileutils" require "yaml" manifest = {} App.assets.each_file do |path| next if File.basename(path).start_with? "_" next if %r|app/views| =~ path.to_s and not %r|app/views/client| =~ path.to_s if asset = App.assets[path] manifest[asset.logical_path] = asset.digest_path file = "public/assets/#{asset.digest_path}" FileUtils.mkdir_p File.dirname file asset.write_to file end end File.open "public/assets/manifest.yml", "wb" do |f| YAML.dump manifest, f end end
Version data entries
11 entries across 11 versions & 1 rubygems