2015-02-22 17:33:01 -08:00
|
|
|
# Builds the frontend for production
|
2015-02-08 23:33:19 -08:00
|
|
|
|
2015-09-17 00:35:26 -07:00
|
|
|
cd "$(dirname "$0")/.."
|
2015-01-17 14:32:33 -08:00
|
|
|
|
2016-07-16 22:32:25 -07:00
|
|
|
cd homeassistant/components/frontend/www_static
|
|
|
|
rm -rf core.js* frontend.html* webcomponents-lite.min.js* panels
|
|
|
|
cd home-assistant-polymer
|
|
|
|
npm run clean
|
2015-07-12 20:43:07 -07:00
|
|
|
npm run frontend_prod
|
2015-02-05 22:36:23 -08:00
|
|
|
|
2015-07-12 20:43:07 -07:00
|
|
|
cp bower_components/webcomponentsjs/webcomponents-lite.min.js ..
|
2016-07-16 22:32:25 -07:00
|
|
|
cp -r build/* ..
|
2016-05-27 21:45:38 -07:00
|
|
|
node script/sw-precache.js
|
|
|
|
cp build/service_worker.js ..
|
2016-07-16 22:32:25 -07:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
gzip -f -k -9 *.html *.js ./panels/*.html
|
2016-05-27 21:45:38 -07:00
|
|
|
|
2014-11-12 00:36:20 -08:00
|
|
|
# Generate the MD5 hash of the new frontend
|
2016-07-16 22:32:25 -07:00
|
|
|
cd ../../../..
|
|
|
|
script/fingerprint_frontend.py
|