we don't bundle lessc anymore, remove its vestiges

This commit is contained in:
MinRK 2014-01-13 16:17:50 -08:00
parent 9db5a0d1e4
commit 063bfa9688
4 changed files with 2 additions and 31 deletions

View File

@ -119,11 +119,6 @@ class IPythonHandler(AuthenticatedHandler):
else:
return app_log
@property
def use_less(self):
"""Use less instead of css in templates"""
return self.settings.get('use_less', False)
#---------------------------------------------------------------
# URLs
#---------------------------------------------------------------
@ -193,7 +188,6 @@ class IPythonHandler(AuthenticatedHandler):
base_kernel_url=self.base_kernel_url,
logged_in=self.logged_in,
login_available=self.login_available,
use_less=self.use_less,
static_url=self.static_url,
)

View File

@ -27,7 +27,6 @@ def _compile_less(source, target, minify=True, verbose=False):
verbose = _to_bool(verbose)
min_flag = '-x' if minify is True else ''
ver_flag = '--verbose' if verbose is True else ''
lessc = os.path.join('components', 'less.js', 'bin', 'lessc')
with lcd(static_dir):
local('{lessc} {min_flag} {ver_flag} {source} {target}'.format(**locals()))
local('lessc {min_flag} {ver_flag} {source} {target}'.format(**locals()))

View File

@ -177,7 +177,6 @@ class NotebookWebApplication(web.Application):
nbextensions_path = ipython_app.nbextensions_path,
mathjax_url=ipython_app.mathjax_url,
config=ipython_app.config,
use_less=ipython_app.use_less,
jinja2_env=Environment(loader=FileSystemLoader(template_path)),
)
@ -367,18 +366,6 @@ class NotebookApp(BaseIPythonApplication):
BROWSER environment variable to override it.
""")
use_less = Bool(False, config=True,
help="""Wether to use Browser Side less-css parsing
instead of compiled css version in templates that allows
it. This is mainly convenient when working on the less
file to avoid a build step, or if user want to overwrite
some of the less variables without having to recompile
everything.
You will need to install the less.js component in the static directory
either in the source tree or in your profile folder.
""")
webapp_settings = Dict(config=True,
help="Supply overrides for the tornado.web.Application that the "
"IPython notebook uses.")

View File

@ -13,13 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block stylesheet %}
{% block lesscss %}
{% if use_less %}
<link rel="stylesheet/less" href="{{ static_url("style/style.less") }}" type="text/css" />
{% else %}
<link rel="stylesheet" href="{{ static_url("style/style.min.css") }}" type="text/css"/>
{% endif %}
{% endblock %}
<link rel="stylesheet" href="{{ static_url("style/style.min.css") }}" type="text/css"/>
{% endblock %}
<link rel="stylesheet" href="{{ static_url("custom/custom.css") }}" type="text/css" />
<script src="{{static_url("components/requirejs/require.js") }}" type="text/javascript" charset="utf-8"></script>
@ -82,9 +76,6 @@
<script src="{{static_url("auth/js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script>
{% block script %}
{% if use_less %}
<script src="{{ static_url("components/less.js/dist/less-1.3.3.min.js") }}" charset="utf-8"></script>
{% endif %}
{% endblock %}
<script src="{{static_url("custom/custom.js") }}" type="text/javascript" charset="utf-8"></script>