Skip to content

Minify fails on already minified javascript #6

@mperham

Description

@mperham
<%= javascript_include_tag :defaults, :cache => true, :concat => true %>

ActiveSupport.on_load(:action_view) do
  ActiveSupport.on_load(:after_initialize) do
    ActionView::Helpers::AssetTagHelper::register_javascript_expansion :defaults => ['modernizr-1.5.min', 'rails', 'application']
  end
end

Unterminated RegExp Literal
vendor/plugins/smurf/lib/smurf/javascript.rb:164:in `action'
vendor/plugins/smurf/lib/smurf/javascript.rb:221:in `jsmin'
vendor/plugins/smurf/lib/smurf/javascript.rb:51:in `initialize'

The problem is modernizr-1.5.min which has already be minified and apparently your pure-Ruby javascript minifier does not handle part of its syntax. You can find modernizr here:

http://www.modernizr.com/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions