Commit e82fa443 by Timothée Peignier

push concatenated javascript into an anonymous function to avoid polluting namespace

parent 2b420bd2
...@@ -56,7 +56,8 @@ class Compressor(object): ...@@ -56,7 +56,8 @@ class Compressor(object):
def concatenate(self, paths): def concatenate(self, paths):
"""Concatenate together a list of files""" """Concatenate together a list of files"""
return '\n'.join([self.read_file(path) for path in paths]) content = '\n'.join([self.read_file(path) for path in paths])
return "(function() { %s }).call(this);" % content
def construct_asset_path(self, asset_path, css_path): def construct_asset_path(self, asset_path, css_path):
public_path = self.absolute_path(asset_path, css_path) public_path = self.absolute_path(asset_path, css_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment