Skip to content

Instantly share code, notes, and snippets.

@rtuin
Last active December 16, 2015 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtuin/5503189 to your computer and use it in GitHub Desktop.
Save rtuin/5503189 to your computer and use it in GitHub Desktop.
before "deploy:finalize_update", "deploy:minify_javascript"
namespace :deploy do
task :minify_javascript do
run_locally "cd #{copy_cache} && java -jar yuicompressor-2.4.7.jar -o public/js/script.min.js public/js/script.unpacked.js"
top.upload(File.join("#{copy_cache}", "/public/js/script.min.js"), "#{release_path}/public/js/script.min.js")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment