From 22101cc000e69f33b388602bbd221a7dfe82c730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 9 Sep 2017 19:50:34 +0200 Subject: [PATCH] fix build script to also build html --- .gitignore | 1 + build.sh | 21 ++++++++++++--------- build_html.php | 2 +- out/.gitkeep | 0 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 out/.gitkeep diff --git a/.gitignore b/.gitignore index 333120f..744d0a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ _env.php js/* css/* +out/* !.gitkeep node_modules/ *.~ diff --git a/build.sh b/build.sh index 45bef28..71131c6 100755 --- a/build.sh +++ b/build.sh @@ -3,15 +3,15 @@ echo "Packing JS..." cat jssrc/chibi.js \ - jssrc/keymaster.js \ - jssrc/utils.js \ - jssrc/modal.js \ - jssrc/notif.js \ - jssrc/appcommon.js \ - jssrc/lang.js \ - jssrc/wifi.js \ - jssrc/term_* \ - jssrc/term.js > js/app-full.js + jssrc/keymaster.js \ + jssrc/utils.js \ + jssrc/modal.js \ + jssrc/notif.js \ + jssrc/appcommon.js \ + jssrc/lang.js \ + jssrc/wifi.js \ + jssrc/term_* \ + jssrc/term.js > js/app-full.js yuicompressor js/app-full.js > js/app.js @@ -19,4 +19,7 @@ echo "Building CSS..." sass --style=compressed sass/app.scss css/app.css +echo "Building HTML..." +php ./build_html.php + echo "ESPTerm front-end ready" diff --git a/build_html.php b/build_html.php index 78f3aea..5bc4f15 100755 --- a/build_html.php +++ b/build_html.php @@ -16,7 +16,7 @@ function process_html($s) { $no_tpl_files = ['help', 'cfg_wifi_conn']; -$dest = ESP_DEMO ? __DIR__ . '/../html_demo/' : __DIR__ . '/../html/'; +$dest = __DIR__ . '/out/'; ob_start(); foreach($_pages as $_k => $p) { diff --git a/out/.gitkeep b/out/.gitkeep new file mode 100644 index 0000000..e69de29