Commit db628664 by Timothée Peignier

Merge branch 'compressors'

parents d86f2cbd 5eb79a30
...@@ -9,7 +9,7 @@ class CoffeeScriptCompiler(SubProcessCompiler): ...@@ -9,7 +9,7 @@ class CoffeeScriptCompiler(SubProcessCompiler):
return path.endswith('.coffee') return path.endswith('.coffee')
def compile_file(self, content): def compile_file(self, content):
command = "%s %s" % (settings.COMPRESS_COFFEE_SCRIPT_BINARY, settings.COMPRESS_COFFEE_SCRIPT_ARGUMENTS) command = "%s -sc %s" % (settings.COMPRESS_COFFEE_SCRIPT_BINARY, settings.COMPRESS_COFFEE_SCRIPT_ARGUMENTS)
if self.verbose: if self.verbose:
command += '--verbose' command += '--verbose'
return self.execute_command(command, content) return self.execute_command(command, content)
...@@ -9,7 +9,7 @@ class SASSCompiler(SubProcessCompiler): ...@@ -9,7 +9,7 @@ class SASSCompiler(SubProcessCompiler):
return filename.endswith('.scss') return filename.endswith('.scss')
def compile_file(self, content): def compile_file(self, content):
command = "%s %s" % (settings.COMPRESS_SASS_BINARY, settings.COMPRESS_SASS_ARGUMENTS) command = "%s --scss %s" % (settings.COMPRESS_SASS_BINARY, settings.COMPRESS_SASS_ARGUMENTS)
if self.verbose: if self.verbose:
command += '--verbose' command += '--verbose'
return self.execute_command(command, content) return self.execute_command(command, content)
...@@ -4,7 +4,7 @@ from compress.compressors import SubProcessCompressor ...@@ -4,7 +4,7 @@ from compress.compressors import SubProcessCompressor
class UglifyJSCompressor(SubProcessCompressor): class UglifyJSCompressor(SubProcessCompressor):
def compress_js(self, js): def compress_js(self, js):
command = '%s %s' % (settings.COMPRESS_UGLIFYJS_BINARY, settings.COMPRESS_UGLIFYJS_ARGUMENTS) command = '%s -nc %s' % (settings.COMPRESS_UGLIFYJS_BINARY, settings.COMPRESS_UGLIFYJS_ARGUMENTS)
if self.verbose: if self.verbose:
command += ' --verbose' command += ' --verbose'
return self.execute_command(command, js) return self.execute_command(command, js)
...@@ -35,13 +35,13 @@ COMPRESS_CLOSURE_BINARY = getattr(settings, 'COMPRESS_CLOSURE_BINARY', '/usr/loc ...@@ -35,13 +35,13 @@ COMPRESS_CLOSURE_BINARY = getattr(settings, 'COMPRESS_CLOSURE_BINARY', '/usr/loc
COMPRESS_CLOSURE_ARGUMENTS = getattr(settings, 'COMPRESS_CLOSURE_ARGUMENTS', '') COMPRESS_CLOSURE_ARGUMENTS = getattr(settings, 'COMPRESS_CLOSURE_ARGUMENTS', '')
COMPRESS_UGLIFYJS_BINARY = getattr(settings, 'COMPRESS_UGLIFYJS_BINARY', '/usr/local/bin/uglifyjs') COMPRESS_UGLIFYJS_BINARY = getattr(settings, 'COMPRESS_UGLIFYJS_BINARY', '/usr/local/bin/uglifyjs')
COMPRESS_UGLIFYJS_ARGUMENTS = getattr(settings, 'COMPRESS_UGLIFYJS_ARGUMENTS', '-nc') COMPRESS_UGLIFYJS_ARGUMENTS = getattr(settings, 'COMPRESS_UGLIFYJS_ARGUMENTS', '')
COMPRESS_COFFEE_SCRIPT_BINARY = getattr(settings, 'COMPRESS_COFFEE_SCRIPT_BINARY', '/usr/local/bin/coffee') COMPRESS_COFFEE_SCRIPT_BINARY = getattr(settings, 'COMPRESS_COFFEE_SCRIPT_BINARY', '/usr/local/bin/coffee')
COMPRESS_COFFEE_SCRIPT_ARGUMENTS = getattr(settings, 'COFFEE_SCRIPT_ARGUMENTS', '-sc') COMPRESS_COFFEE_SCRIPT_ARGUMENTS = getattr(settings, 'COFFEE_SCRIPT_ARGUMENTS', '')
COMPRESS_SASS_BINARY = getattr(settings, 'COMPRESS_SASS_BINARY', '/usr/local/bin/sass') COMPRESS_SASS_BINARY = getattr(settings, 'COMPRESS_SASS_BINARY', '/usr/local/bin/sass')
COMPRESS_SASS_ARGUMENTS = getattr(settings, 'COMPRESS_SASS_ARGUMENTS', '--scss') COMPRESS_SASS_ARGUMENTS = getattr(settings, 'COMPRESS_SASS_ARGUMENTS', '')
COMPRESS_LESS_BINARY = getattr(settings, 'COMPRESS_LESS_BINARY', '/usr/local/bin/lessc') COMPRESS_LESS_BINARY = getattr(settings, 'COMPRESS_LESS_BINARY', '/usr/local/bin/lessc')
COMPRESS_LESS_ARGUMENTS = getattr(settings, 'COFFEE_LESS_ARGUMENTS', '') COMPRESS_LESS_ARGUMENTS = getattr(settings, 'COFFEE_LESS_ARGUMENTS', '')
......
...@@ -71,7 +71,7 @@ class VersioningBase(object): ...@@ -71,7 +71,7 @@ class VersioningBase(object):
def version(self, source_files): def version(self, source_files):
raise NotImplementedError raise NotImplementedError
def needs_update(self, output_file, source_files, version): def needs_update(self, output_file, paths, version):
raise NotImplementedError raise NotImplementedError
......
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