Skip to content

Instantly share code, notes, and snippets.

@noma4i
Created October 11, 2016 00:54
Show Gist options
  • Save noma4i/aec2e15634420faa3dced9c89fa90900 to your computer and use it in GitHub Desktop.
Save noma4i/aec2e15634420faa3dced9c89fa90900 to your computer and use it in GitHub Desktop.
Snippet to find any broken asset which can lead to ExecJS punc error
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