diff --git a/data/js/app.js.gz b/data/js/app.js.gz deleted file mode 100644 index 892c4ab..0000000 Binary files a/data/js/app.js.gz and /dev/null differ diff --git a/platformio.ini b/platformio.ini index 84645fa..bd4c895 100644 --- a/platformio.ini +++ b/platformio.ini @@ -20,7 +20,7 @@ platform = espressif32 build_flags = ${env.build_flags} -D=${PIOENV} - -DCOMPONENT_EMBED_FILES=data/index.html.gz:data/zones.json.gz:data/favicon.ico:data/js/app.js.gz + -DCOMPONENT_EMBED_FILES=webapp_dist/index.html.gz:webapp_dist/zones.json.gz:webapp_dist/favicon.ico:webapp_dist/js/app.js.gz lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git diff --git a/src/WebApi_webapp.cpp b/src/WebApi_webapp.cpp index 8c100da..704cdd8 100644 --- a/src/WebApi_webapp.cpp +++ b/src/WebApi_webapp.cpp @@ -1,14 +1,14 @@ #include "WebApi_webapp.h" -extern const uint8_t file_index_html_start[] asm("_binary_data_index_html_gz_start"); -extern const uint8_t file_favicon_ico_start[] asm("_binary_data_favicon_ico_start"); -extern const uint8_t file_zones_json_start[] asm("_binary_data_zones_json_gz_start"); -extern const uint8_t file_app_js_start[] asm("_binary_data_js_app_js_gz_start"); +extern const uint8_t file_index_html_start[] asm("_binary_webapp_dist_index_html_gz_start"); +extern const uint8_t file_favicon_ico_start[] asm("_binary_webapp_dist_favicon_ico_start"); +extern const uint8_t file_zones_json_start[] asm("_binary_webapp_dist_zones_json_gz_start"); +extern const uint8_t file_app_js_start[] asm("_binary_webapp_dist_js_app_js_gz_start"); -extern const uint8_t file_index_html_end[] asm("_binary_data_index_html_gz_end"); -extern const uint8_t file_favicon_ico_end[] asm("_binary_data_favicon_ico_end"); -extern const uint8_t file_zones_json_end[] asm("_binary_data_zones_json_gz_end"); -extern const uint8_t file_app_js_end[] asm("_binary_data_js_app_js_gz_end"); +extern const uint8_t file_index_html_end[] asm("_binary_webapp_dist_index_html_gz_end"); +extern const uint8_t file_favicon_ico_end[] asm("_binary_webapp_dist_favicon_ico_end"); +extern const uint8_t file_zones_json_end[] asm("_binary_webapp_dist_zones_json_gz_end"); +extern const uint8_t file_app_js_end[] asm("_binary_webapp_dist_js_app_js_gz_end"); void WebApiWebappClass::init(AsyncWebServer* server) { diff --git a/webapp/vue.config.js b/webapp/vue.config.js index 1538d2a..05dd78a 100644 --- a/webapp/vue.config.js +++ b/webapp/vue.config.js @@ -2,7 +2,7 @@ const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, productionSourceMap: false, - outputDir: '../data', + outputDir: '../webapp_dist', filenameHashing: false, css: { extract: false, diff --git a/data/favicon.ico b/webapp_dist/favicon.ico similarity index 100% rename from data/favicon.ico rename to webapp_dist/favicon.ico diff --git a/data/index.html.gz b/webapp_dist/index.html.gz similarity index 100% rename from data/index.html.gz rename to webapp_dist/index.html.gz diff --git a/webapp_dist/js/app.js.gz b/webapp_dist/js/app.js.gz new file mode 100644 index 0000000..5893f55 Binary files /dev/null and b/webapp_dist/js/app.js.gz differ diff --git a/data/zones.json.gz b/webapp_dist/zones.json.gz similarity index 100% rename from data/zones.json.gz rename to webapp_dist/zones.json.gz