Show More
@@ -33,13 +33,17 b' def _compile_less(source, target, minify=True, verbose=False):' | |||
|
33 | 33 | ver_flag = '--verbose' if verbose is True else '' |
|
34 | 34 | |
|
35 | 35 | # pin less to 1.4 |
|
36 | try: | |
|
36 | 37 | out = check_output(['lessc', '--version']) |
|
38 | except OSError as err: | |
|
39 | raise ValueError("Unable to find lessc. Please install lessc >= %s and < %s " \ | |
|
40 | % (min_less_version, max_less_version)) | |
|
37 | 41 | out = out.decode('utf8', 'replace') |
|
38 | 42 | less_version = out.split()[1] |
|
39 | 43 | if V(less_version) < V(min_less_version): |
|
40 | 44 | raise ValueError("lessc too old: %s < %s" % (less_version, min_less_version)) |
|
41 | if V(less_version) > V(max_less_version): | |
|
42 | raise ValueError("lessc too new: %s > %s" % (less_version, max_less_version)) | |
|
45 | if V(less_version) >= V(max_less_version): | |
|
46 | raise ValueError("lessc too new: %s >= %s" % (less_version, max_less_version)) | |
|
43 | 47 | |
|
44 | 48 | with lcd(static_dir): |
|
45 | 49 | local('lessc {min_flag} {ver_flag} {source} {target}'.format(**locals())) |
General Comments 0
You need to be logged in to leave comments.
Login now