Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "fileutils"
- namespace :assets do
- namespace :precompile do
- desc "Faster way to compile assets"
- task fast: ["assets:environment", "tmp:cache:clear", "assets:precompile:primary"] do
- config = Rails.application.config
- if config.assets.digest
- assets_path = File.join(Rails.public_path, config.assets.prefix)
- manifest_path = config.assets.manifest || assets_path
- manifest = YAML.load_file "#{manifest_path}/manifest.yml"
- manifest.each do |file, digest_file|
- FileUtils.cp "#{assets_path}/#{digest_file}", "#{assets_path}/#{file}"
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment