1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 12:49:19 +00:00

Build a new Hass.io panel (#1271)

* Build a new Hass.io panel

* Use webcomponents-lite.js

* Compress new panel

* Lint
This commit is contained in:
Paulus Schoutsen
2018-06-08 15:26:48 -04:00
committed by GitHub
parent 92930a2b94
commit d243f2ead6
11 changed files with 112 additions and 101 deletions

View File

@@ -6,11 +6,14 @@ set -e
cd "$(dirname "$0")/.."
OUTPUT_DIR=build
OUTPUT_DIR_ES5=build-es5
rm -rf $OUTPUT_DIR_ES5
rm -rf $OUTPUT_DIR $OUTPUT_DIR_ES5
node script/gen-icons.js
NODE_ENV=production ../node_modules/.bin/webpack -p
# LEGACY BUILD
NODE_ENV=production ../node_modules/.bin/webpack -p --config webpack.legacy.config.js
node script/gen-index-html.js
# Temporarily re-create old HTML import
@@ -20,3 +23,6 @@ cat $OUTPUT_DIR_ES5/chunk.*.js >> $OUTPUT_DIR_ES5/hassio-app.html
echo "</script>" >> $OUTPUT_DIR_ES5/hassio-app.html
rm $OUTPUT_DIR_ES5/app.js*
rm $OUTPUT_DIR_ES5/chunk.*
# NEW BUILD
NODE_ENV=production ../node_modules/.bin/webpack -p --config webpack.config.js

View File

@@ -4,10 +4,9 @@
# Stop on errors
set -e
OUTPUT_DIR_ES5=build-es5
OUTPUT_DIR=build
rm -rf $OUTPUT_DIR_ES5
mkdir $OUTPUT_DIR_ES5
node script/gen-index-html.js
rm -rf $OUTPUT_DIR
mkdir $OUTPUT_DIR
node script/gen-icons.js
../node_modules/.bin/webpack --watch --progress

View File

@@ -15,4 +15,4 @@ for (item of toReplace) {
index = index.replace(item[0], item[1]);
}
fs.writeFileSync(`${config.buildDir}/index.html`, index);
fs.writeFileSync(`${config.buildDirLegacy}/index.html`, index);