From 1f2341ba57761c3b9d0353a43237091f7533b663 Mon Sep 17 00:00:00 2001 From: MinRK Date: Sun, 7 Apr 2013 12:48:20 -0700 Subject: [PATCH 1/2] ignore bower components --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c4ba5a3eb..6adb8db12 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ docs/man/*.gz docs/source/api/generated docs/gh-pages IPython/frontend/html/notebook/static/mathjax +IPython/frontend/html/notebook/static/components *.py[co] __pycache__ build From 0323bea1941e38ac26ef8d8a618cf29718af67aa Mon Sep 17 00:00:00 2001 From: MinRK Date: Sun, 7 Apr 2013 12:50:10 -0700 Subject: [PATCH 2/2] add `fab components` installs components with bower --- IPython/frontend/html/notebook/fabfile.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/fabfile.py b/IPython/frontend/html/notebook/fabfile.py index 64a2ea7db..f156bf824 100644 --- a/IPython/frontend/html/notebook/fabfile.py +++ b/IPython/frontend/html/notebook/fabfile.py @@ -9,15 +9,19 @@ components_dir = os.path.join(static_dir,'components') def test_component(name): if not os.path.exists(os.path.join(components_dir,name)): - abort('cannot continue without component {}.'.format(name)) + components() +def components(): + """install components with bower""" + with lcd(static_dir): + local('bower install') def css(minify=True): """generate the css from less files""" test_component('bootstrap') test_component('less.js') - if minify not in ['True','False',True,False]: - abort('need to get Boolean') + 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 ''