Remove ignore minified

Jonathan Frederic 10 years ago
parent b0fa952a82
commit 508804153a

@ -16,13 +16,11 @@ To install the static dependencies, run:
You can also pass a `-f` flag to this command to force Bower to run, if necessary.
### Minified JavaScript
### JavaScript
To compile the minified JavaScript, run:
To compile the JavaScript, run:
python setup.py js
You can also run the notebook server without relying on the minified JavaScript by passing the `--NotebookApp.ignore_minified_js=True` flag when launching the notebook.
npm run build:js
### Compiling CSS

@ -54,12 +54,9 @@ Prototyping tip
---------------
When doing prototyping which needs quick iteration of the Notebook's
JavaScript, the bundled and minified JavaScript may be deactivated. To do
this, start the Notebook with the option
``--NotebookApp.ignore_minified_js=True``. This increases
the number of requests that the browser makes to the server, but it allows
testing JavaScript file modification without going through the time consuming
compilation step that may take up to 30 seconds.
JavaScript, run `npm run build:watch` in the root of the repository.
This will cause WebPack to monitor the files you edit and recompile
them on the fly.
.. _Node.js: https://nodejs.org

@ -118,15 +118,6 @@ class IPythonHandler(AuthenticatedHandler):
Mostly property shortcuts to IPython-specific settings.
"""
@property
def ignore_minified_js(self):
"""Wether to user bundle in template. (*.min files)
Mainly use for development and avoid file recompilation
"""
return self.settings.get('ignore_minified_js', False)
@property
def config(self):
return self.settings.get('config', None)
@ -314,7 +305,6 @@ class IPythonHandler(AuthenticatedHandler):
sys_info=sys_info,
contents_js_source=self.contents_js_source,
version_hash=self.version_hash,
ignore_minified_js=self.ignore_minified_js,
**self.jinja_template_vars
)

@ -189,8 +189,7 @@ class NotebookWebApplication(web.Application):
'no_cache_paths': [url_path_join(base_url, 'static', 'custom')],
},
version_hash=version_hash,
ignore_minified_js=ipython_app.ignore_minified_js,
# rate limits
iopub_msg_rate_limit=ipython_app.iopub_msg_rate_limit,
iopub_data_rate_limit=ipython_app.iopub_data_rate_limit,
@ -414,11 +413,6 @@ class NotebookApp(JupyterApp):
"""override default log format to include time"""
return u"%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s]%(end_color)s %(message)s"
ignore_minified_js = Bool(False,
config=True,
help='Use minified JS file or not, mainly use during dev to avoid JS recompilation',
)
# file to be opened in the notebook server
file_to_run = Unicode('', config=True)

@ -95,9 +95,5 @@ data-file-path="{{file_path}}"
{{super()}}
{% if ignore_minified_js %}
<script src="{{ static_url("edit/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
{% else %}
<script src="{{ static_url("edit/js/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endif %}
<script src="{{ static_url("edit/js/built/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}

@ -344,10 +344,6 @@ data-notebook-path="{{notebook_path | urlencode}}"
<script src="{{ static_url("components/text-encoding/lib/encoding.js") }}" charset="utf-8"></script>
{% if ignore_minified_js %}
<script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
{% else %}
<script src="{{ static_url("notebook/js/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endif %}
<script src="{{ static_url("notebook/js/built/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}

@ -24,11 +24,7 @@
{% endif %}
baseUrl: '{{static_url("", include_version=False)}}',
paths: {
{% if ignore_minified_js %}
'auth/js/main': 'auth/js/main',
{% else %}
'auth/js/main': 'auth/js/main.min',
{% endif %}
'auth/js/main': 'auth/js/built/main.min',
custom : '{{ base_url }}custom',
nbextensions : '{{ base_url }}nbextensions',
widgets : '{{ base_url }}deprecatedwidgets',

@ -181,9 +181,6 @@ data-terminals-available="{{terminals_available}}"
{% block script %}
{{super()}}
{% if ignore_minified_js %}
<script src="{{ static_url("tree/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
{% else %}
<script src="{{ static_url("tree/js/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endif %}
<script src="{{ static_url("tree/js/built/main.min.js") }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}

Loading…
Cancel
Save