Skip to content

Instantly share code, notes, and snippets.

@harley
Last active September 26, 2017 19:26
Show Gist options
  • Save harley/e717c21a97f6c2bf5cda8f689424d707 to your computer and use it in GitHub Desktop.
Save harley/e717c21a97f6c2bf5cda8f689424d707 to your computer and use it in GitHub Desktop.
compile js manually to detect unsupported syntax in asset js
# source https://stackoverflow.com/a/38605526
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment