wycats / rake-pipeline-web-filters

MIT License
116 stars 36 forks source link

UglifyJS bug fix not included #12

Closed bobspryn closed 12 years ago

bobspryn commented 12 years ago

https://github.com/mishoo/UglifyJS/issues/126

So this is probably more of a Ruby gem issue than here, but uglifyjs is stripping the last semicolon of the file, which generates a very hard to find bug when concatenating file together. Looks like it was fixed but the latest ruby gem hasn't pulled it in. Perhaps we can work around it until then?

dudleyf commented 12 years ago

Yeah, this is a bug in the uglifier gem. The version of uglifyjs they're using includes that fix, so I'm not sure what's going on there.

bobspryn commented 12 years ago

for now just use a simple stupid filter to get around this:

class FixUglifyFilter < Rake::Pipeline::Filter
  def generate_output(inputs, output)
    inputs.each do |input|
      output.write input.read + ";"
    end
  end
end
ahawkins commented 12 years ago

Just need to require "~> 1.2.3". It's been fixed in that uglifier patch version.

bobspryn commented 12 years ago

Sweet. It'll be nice to get rid of that extra filter.