Commit bca184da by Timothée Peignier

add sass compiler

parent 312f5a71
from compress.conf import settings
from compress.compilers import SubProcessCompiler
class SASSCompiler(SubProcessCompiler):
def match_file(self, filename):
return filename.endswith('.scss')
def compile_file(self, content):
command = "%s %s" % (settings.COMPRESS_SASS_BINARY, settings.COMPRESS_SASS_ARGUMENTS)
if self.verbose:
command += '--verbose'
return self.execute_command(command, content)
......@@ -38,6 +38,9 @@ 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_SASS_BINARY = getattr(settings, 'COMPRESS_SASS_BINARY', '/usr/local/bin/sass')
COMPRESS_SASS_ARGUMENTS = getattr(settings, 'COMPRESS_SASS_ARGUMENTS', '--scss')
if COMPRESS_CSS_COMPRESSORS is None:
COMPRESS_CSS_COMPRESSORS = []
......
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