##// END OF EJS Templates
Merge pull request #3144 from minrk/bower...
Brian E. Granger -
r10197:7eac9ac7 merge
parent child Browse files
Show More
@@ -1,15 +1,16
1 MANIFEST
1 MANIFEST
2 build
2 build
3 dist
3 dist
4 _build
4 _build
5 docs/man/*.gz
5 docs/man/*.gz
6 docs/source/api/generated
6 docs/source/api/generated
7 docs/gh-pages
7 docs/gh-pages
8 IPython/frontend/html/notebook/static/mathjax
8 IPython/frontend/html/notebook/static/mathjax
9 IPython/frontend/html/notebook/static/components
9 *.py[co]
10 *.py[co]
10 __pycache__
11 __pycache__
11 build
12 build
12 *.egg-info
13 *.egg-info
13 *~
14 *~
14 *.bak
15 *.bak
15 .tox
16 .tox
@@ -1,26 +1,30
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 def test_component(name):
10 def test_component(name):
11 if not os.path.exists(os.path.join(components_dir,name)):
11 if not os.path.exists(os.path.join(components_dir,name)):
12 abort('cannot continue without component {}.'.format(name))
12 components()
13
13
14 def components():
15 """install components with bower"""
16 with lcd(static_dir):
17 local('bower install')
14
18
15 def css(minify=True):
19 def css(minify=True):
16 """generate the css from less files"""
20 """generate the css from less files"""
17 test_component('bootstrap')
21 test_component('bootstrap')
18 test_component('less.js')
22 test_component('less.js')
19 if minify not in ['True','False',True,False]:
23 if minify not in ['True', 'False', True, False]:
20 abort('need to get Boolean')
24 abort('minify must be Boolean')
21 minify = (minify in ['True',True])
25 minify = (minify in ['True',True])
22
26
23 min_flag= '-x' if minify is True else ''
27 min_flag= '-x' if minify is True else ''
24 with lcd(static_dir):
28 with lcd(static_dir):
25 local('lessc {min_flag} less/style.less css/style.min.css'.format(min_flag=min_flag))
29 local('lessc {min_flag} less/style.less css/style.min.css'.format(min_flag=min_flag))
26
30
General Comments 0
You need to be logged in to leave comments. Login now