Browse Source

Merge pull request #40 from vincentbernat/hyde

---
main
Lakshmi Vyasarajan 13 years ago
parent
commit
78f464a7ec
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      hyde/ext/plugins/less.py

+ 14
- 1
hyde/ext/plugins/less.py View File

@@ -71,11 +71,24 @@ class LessCSSPlugin(CLTransformer):
""" """
if not resource.source_file.kind == 'less': if not resource.source_file.kind == 'less':
return return

supported = [
"verbose",
("silent", "s"),
("compress", "x"),
"O0",
"O1",
"O2"
]

less = self.app less = self.app
source = File.make_temp(text) source = File.make_temp(text)
target = File.make_temp('') target = File.make_temp('')
args = [str(less)]
args.extend(self.process_args(supported))
args.extend([str(source), str(target)])
try: try:
self.call_app([str(less), str(source), str(target)])
self.call_app(args)
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
raise self.template.exception_class( raise self.template.exception_class(
"Cannot process %s. Error occurred when " "Cannot process %s. Error occurred when "


Loading…
Cancel
Save