Show More
@@ -1,20 +1,21 b'' | |||||
1 | """ fabfile to prepare the notebook """ |
|
1 | """ fabfile to prepare the notebook """ | |
2 |
|
2 | |||
3 | from fabric.api import local,lcd |
|
3 | from fabric.api import local,lcd | |
4 | from fabric.utils import abort |
|
4 | from fabric.utils import abort | |
5 | import os |
|
5 | import os | |
6 |
|
6 | |||
7 | static_dir = 'static' |
|
7 | static_dir = 'static' | |
8 | components_dir = os.path.join(static_dir, 'components') |
|
8 | components_dir = os.path.join(static_dir, 'components') | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | def css(minify=True): |
|
11 | def css(minify=True): | |
12 | """generate the css from less files""" |
|
12 | """generate the css from less files""" | |
13 | if minify not in ['True', 'False', True, False]: |
|
13 | if minify not in ['True', 'False', True, False]: | |
14 | abort('minify must be Boolean') |
|
14 | abort('minify must be Boolean') | |
15 | minify = (minify in ['True',True]) |
|
15 | minify = (minify in ['True',True]) | |
16 |
|
16 | |||
17 | min_flag= '-x' if minify is True else '' |
|
17 | min_flag= '-x' if minify is True else '' | |
|
18 | lessc = os.path.join('components', 'less.js', 'bin', 'lessc') | |||
18 | with lcd(static_dir): |
|
19 | with lcd(static_dir): | |
19 |
local('lessc {min_flag} less/style.less css/style.min.css'.format( |
|
20 | local('{lessc} {min_flag} less/style.less css/style.min.css'.format(**locals())) | |
20 |
|
21 |
General Comments 0
You need to be logged in to leave comments.
Login now