Web development involves endless reloading of pages. It gets old really
fast.
Here is an @button script that I found useful yesterday. It allowed me to
fiddle with the .css and javascript for mod_http itself without having to
reload Leo:
@button test-mod-http
if c.isChanged():
c.save()
# Make sure mod_http is loaded, even if it isn't in @enabled-plugins
g.app.pluginsController.loadOnePlugin(
'leo.plugins.mod_http',
tag='open0',
verbose=False)
# *Always* use the most current settings.
# This reloads settings from leoSettings.leo and myLeoSettings.leo.
g.app.loadManager.readGlobalSettingsFiles()
# Open the web page.
g.handleUrl('http://127.0.0.1:8130/leoPlugins.leo')
This was oh so useful. I could just change the settings in myLeoSettings
and hit Ctrl-p to re-execute the button. Note that this trick doesn't work
when changing mod_http.py itself, but most of the work involved the css and
javascript.
This pattern could be useful to other web developers.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.