23 lines
519 B
Plaintext
Executable File
23 lines
519 B
Plaintext
Executable File
# Builds the frontend for production
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
cd homeassistant/components/frontend/www_static
|
|
rm -rf core.js* frontend.html* webcomponents-lite.min.js* panels
|
|
cd home-assistant-polymer
|
|
npm run clean
|
|
npm run frontend_prod
|
|
|
|
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
|
|
cp -r build/* ..
|
|
node script/sw-precache.js
|
|
cp build/service_worker.js ..
|
|
|
|
cd ..
|
|
|
|
gzip -f -k -9 *.html *.js ./panels/*.html
|
|
|
|
# Generate the MD5 hash of the new frontend
|
|
cd ../../../..
|
|
script/fingerprint_frontend.py
|