53 |
53 |
pass
|
54 |
54 |
|
55 |
55 |
def run(self):
|
56 |
|
sass_bin = None
|
57 |
|
for program in ('sassc', 'sass'):
|
58 |
|
sass_bin = find_executable(program)
|
59 |
|
if sass_bin:
|
60 |
|
break
|
|
56 |
sass_bin = find_executable('sassc')
|
61 |
57 |
if not sass_bin:
|
62 |
|
raise CompileError('A sass compiler is required but none was found. See sass-lang.com for choices.')
|
|
58 |
raise CompileError('sassc is required but was not found.')
|
63 |
59 |
|
64 |
60 |
for path, dirnames, filenames in os.walk('wcs'):
|
65 |
61 |
for filename in filenames:
|
... | ... | |
67 |
63 |
continue
|
68 |
64 |
if filename.startswith('_'):
|
69 |
65 |
continue
|
70 |
|
subprocess.check_call([sass_bin, '%s/%s' % (path, filename),
|
|
66 |
subprocess.check_call([
|
|
67 |
sass_bin,
|
|
68 |
'--sourcemap',
|
|
69 |
'%s/%s' % (path, filename),
|
71 |
70 |
'%s/%s' % (path, filename.replace('.scss', '.css'))])
|
72 |
71 |
|
73 |
72 |
|
... | ... | |
97 |
96 |
|
98 |
97 |
def data_tree(destdir, sourcedir):
|
99 |
98 |
extensions = ['.css', '.png', '.jpeg', '.jpg', '.gif', '.xml', '.html',
|
100 |
|
'.js', '.ezt', '.dat', '.eot', '.svg', '.ttf', '.woff']
|
|
99 |
'.js', '.ezt', '.dat', '.eot', '.svg', '.ttf', '.woff', '.scss',
|
|
100 |
'.map']
|
101 |
101 |
r = []
|
102 |
102 |
for root, dirs, files in os.walk(sourcedir):
|
103 |
103 |
l = [os.path.join(root, x) for x in files if os.path.splitext(x)[1] in extensions]
|
104 |
|
-
|