Include dev version of vue.js if available in the HTTP static/js
folder, otherwise include the minified version
This commit is contained in:
parent
abbfe517de
commit
3bbb6cf053
2 changed files with 7 additions and 2 deletions
|
@ -32,8 +32,12 @@
|
|||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% if utils.isfile(static_folder, 'js', 'lib', 'vue.js') %}
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
|
||||
{% else %}
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
|
||||
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
|
||||
|
|
|
@ -109,7 +109,8 @@ class HttpUtils(object):
|
|||
return f.read()
|
||||
|
||||
@classmethod
|
||||
def isfile(cls, file):
|
||||
return os.path.isfile(file)
|
||||
def isfile(cls, *path):
|
||||
path = path[0] if len(path) == 1 else os.path.join(*path)
|
||||
return os.path.isfile(path)
|
||||
|
||||
# vim:sw=4:ts=4:et:
|
||||
|
|
Loading…
Reference in a new issue