You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
675 B
26 lines
675 B
""" fabfile to prepare the notebook """
|
|
|
|
from fabric.api import local,lcd
|
|
from fabric.utils import abort
|
|
import os
|
|
|
|
static_dir = 'static'
|
|
components_dir = os.path.join(static_dir,'components')
|
|
|
|
|
|
def components():
|
|
"""install components with bower"""
|
|
with lcd(static_dir):
|
|
local('bower install')
|
|
|
|
def css(minify=True):
|
|
"""generate the css from less files"""
|
|
if minify not in ['True', 'False', True, False]:
|
|
abort('minify must be Boolean')
|
|
minify = (minify in ['True',True])
|
|
|
|
min_flag= '-x' if minify is True else ''
|
|
with lcd(static_dir):
|
|
local('lessc {min_flag} less/style.less css/style.min.css'.format(min_flag=min_flag))
|
|
|