Extract frontend code into own repository
This commit is contained in:
parent
27850ef5df
commit
c861622748
67 changed files with 146 additions and 26026 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue