Add inline and watch helper scripts

This commit is contained in:
cpq
2026-04-27 09:25:29 +01:00
parent e21f5ab6c7
commit edd2d06627
4 changed files with 237 additions and 3 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ $(PROG): $(SOURCES) $(MONGOOSE_DIR)/mongoose.h
# Generate a single, self-contained dashboard.html from the UI in web_root/
dashboard.html: $(wildcard web_root/*)
monolith web_root/index.html -o $@
node $(MONGOOSE_DIR)/resources/inline.js web_root/index.html -o $@
# Create an embedded filesystem containing compressed dashboard.html
dashboard.html.c: dashboard.html
@@ -28,7 +28,7 @@ purge:
# For development: rebuild and restart if any of the sources change
watch:
watchexec -r -w main.c -w mongoose_dashboard.c -w $(MONGOOSE_DIR)/mongoose.h -w web_root -e c,h,html,css,js,svg,png -- make
node $(MONGOOSE_DIR)/resources/watch.js -w main.c -w mongoose_dashboard.c -w $(MONGOOSE_DIR)/mongoose.h -w web_root -- make
clean:
rm -rf $(PROG) *.exe *.obj *.dSYM mongoose dashboard.*
@@ -282,7 +282,7 @@
</div>
<div class="file-size">${f.size}</div>
<div class="file-actions">
<a onclick="window.open('files/${encodeURIComponent(f.name)}', '_blank')" target="_blank" class="btn btn-secondary">
<a href="files/${encodeURIComponent(f.name)}" target="_blank" class="btn btn-secondary">
<svg viewBox="0 0 24 24" class="nav-icon" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 3v12" />
<path d="m7 10 5 5 5-5" />