Merge pull request #216 from balloob/polymer-es6

Extract frontend code into own repository
This commit is contained in:
Paulus Schoutsen committed 2015-07-12 23:06:11 -07:00
commit 34b6627f9a
69 files changed
+146 -26054

No files matched your search

+6 -15
View File
@@ -6,24 +6,15 @@ if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
scripts/build_js $1
cd homeassistant/components/frontend/www_static/home-assistant-polymer
npm install
npm run frontend_prod
# To build the frontend, you need node, bower, vulcanize and html-minifier
# npm install -g bower vulcanize html-minifier
# Install dependencies
cd homeassistant/components/frontend/www_static/polymer
bower install
cd ..
cp polymer/bower_components/webcomponentsjs/webcomponents-lite.min.js .
vulcanize --inline-css --inline-scripts --strip-comments polymer/home-assistant.html > frontend.html
# html-minifier crashes on frontend, minimize kills the CSS
# html-minifier --config-file polymer/html-minifier.conf -o frontend.html frontend.html
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
cp build/frontend.html ..
# Generate the MD5 hash of the new frontend
cd ..
cd ../..
echo '""" DO NOT MODIFY. Auto-generated by build_frontend script """' > version.py
if [ $(command -v md5) ]; then
echo 'VERSION = "'`md5 -q www_static/frontend.html`'"' >> version.py
-17
View File
@@ -1,17 +0,0 @@
# Builds the JS for production
# If current pwd is scripts, go 1 up.
if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
cd homeassistant/components/frontend/www_static/polymer/home-assistant-js
npm install
if [ "$1" = "demo" ]; then
echo "Building a demo mode build!"
npm run demo
else
npm run prod
fi
-11
View File
@@ -1,11 +0,0 @@
# Builds the JS for developing, rebuilds when files change
# If current pwd is scripts, go 1 up.
if [ ${PWD##*/} == "scripts" ]; then
cd ..
fi
cd homeassistant/components/frontend/www_static/polymer/home-assistant-js
npm install
npm run dev