Commit 67b3e9d0 by Timothée Peignier

make required options obligatory

parent edcc752a
......@@ -9,7 +9,7 @@ class CoffeeScriptCompiler(SubProcessCompiler):
return path.endswith('.coffee')
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:
command += '--verbose'
return self.execute_command(command, content)
......@@ -9,7 +9,7 @@ class SASSCompiler(SubProcessCompiler):
return filename.endswith('.scss')
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:
command += '--verbose'
return self.execute_command(command, content)
......@@ -4,7 +4,7 @@ from compress.compressors import SubProcessCompressor
class UglifyJSCompressor(SubProcessCompressor):
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:
command += ' --verbose'
return self.execute_command(command, js)
......@@ -35,13 +35,13 @@ COMPRESS_CLOSURE_BINARY = getattr(settings, 'COMPRESS_CLOSURE_BINARY', '/usr/loc
COMPRESS_CLOSURE_ARGUMENTS = getattr(settings, 'COMPRESS_CLOSURE_ARGUMENTS', '')
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_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_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_ARGUMENTS = getattr(settings, 'COFFEE_LESS_ARGUMENTS', '')
......
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