feat(workflow): example stats page with embedded Chart.js, inline form validation errors

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 01:59:27 +02:00
co-authored by Claude Sonnet 5.5
parent 16a0bb0de4
commit 00af65613d
36 changed files with 1274 additions and 138 deletions
+34
View File
@@ -0,0 +1,34 @@
// Build-time helper: embeds example/assets into generated C++ using the
// MoloApp embedder (src/cli/embed). Same engine as `molo embed`, without the
// CLI's database and TLS link dependencies.
// Usage: embed_assets <asset-dir> <out.cpp> <out.hpp> <namespace>
#include <iostream>
#include <string>
#include "embed/asset_scanner.hpp"
#include "embed/embed_emitter.hpp"
int main(int argc, char** argv) {
if (argc != 5) {
std::cerr << "usage: embed_assets <dir> <out.cpp> <out.hpp> <namespace>\n";
return 2;
}
molo::embed::AssetScanner scanner;
molo::embed::ScanResult scanned = scanner.scan(argv[1]);
if (!scanned.ok()) {
std::cerr << scanned.error << "\n";
return 1;
}
molo::embed::EmitOptions opts;
opts.namespc = argv[4];
molo::embed::EmbedEmitter emitter;
std::string error;
if (!emitter.emit(scanned.files, argv[2], argv[3], opts, error)) {
std::cerr << error << "\n";
return 1;
}
std::cout << "embedded " << scanned.files.size() << " files ("
<< scanned.total_bytes << " bytes)\n";
return 0;
}