diff --git a/build_frontend b/build_frontend index 3e1b3d03a99..4266f4ddd20 100755 --- a/build_frontend +++ b/build_frontend @@ -1,10 +1,21 @@ # To build the frontend, you need node, bower and vulcanize # npm install -g bower vulcanize + +# Install dependencies cd homeassistant/components/http/www_static/polymer bower install cd .. -cp polymer/bower_components/platform/platform.js polymer_platform.js +cp polymer/bower_components/webcomponentsjs/webcomponents.min.js . + +# Let Polymer refer to the minified JS version before we compile +sed -i.bak 's/polymer\.js/polymer\.min\.js/' polymer/bower_components/polymer/polymer.html vulcanize -o frontend.html --inline polymer/splash-login.html + +# Revert back the change to the Polymer component +rm polymer/bower_components/polymer/polymer.html +mv polymer/bower_components/polymer/polymer.html.bak polymer/bower_components/polymer/polymer.html + +# Generate the MD5 hash of the new frontend cd .. echo '""" DO NOT MODIFY. Auto-generated by build_frontend script """' > frontend.py echo 'VERSION = "'`md5 -q www_static/frontend.html`'"' >> frontend.py diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 2999a50fb38..11e08ecdc62 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -362,7 +362,7 @@ class RequestHandler(SimpleHTTPRequestHandler): "
" "