From 21f64f056b9805adeaccaeac7b52265e2bf7261f Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 7 May 2011 09:13:12 +0200 Subject: [PATCH] less compiler accept several arguments including compression --- hyde/ext/plugins/less.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hyde/ext/plugins/less.py b/hyde/ext/plugins/less.py index 575072a..7ecaf38 100644 --- a/hyde/ext/plugins/less.py +++ b/hyde/ext/plugins/less.py @@ -71,11 +71,24 @@ class LessCSSPlugin(CLTransformer): """ if not resource.source_file.kind == 'less': return + + supported = [ + "verbose", + ("silent", "s"), + ("compress", "x"), + "O0", + "O1", + "O2" + ] + less = self.app source = File.make_temp(text) target = File.make_temp('') + args = [str(less)] + args.extend(self.process_args(supported)) + args.extend([str(source), str(target)]) try: - self.call_app([str(less), str(source), str(target)]) + self.call_app(args) except subprocess.CalledProcessError: raise self.template.exception_class( "Cannot process %s. Error occurred when "