Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
public/app.js
public/app.js.map
public/styles.css
public/health.json
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.9",
"version": "0.2.10",
"license": "MIT",
"tasks": {
"dev": "deno run --allow-all --watch src/server.ts",
Expand Down
8 changes: 8 additions & 0 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ const UI_LIB_CSS_FILES = [
"nav/nav.css",
];

async function writeHealthJson(version: string): Promise<void> {
const health = { status: "ok", service: "network-dashboard", version };
await Deno.writeTextFile("public/health.json", JSON.stringify(health) + "\n");
console.log(`Built public/health.json (network-dashboard ${version})`);
}

async function buildStyles(): Promise<void> {
const parts: string[] = [];
for (const path of UI_LIB_CSS_FILES) {
Expand All @@ -44,6 +50,8 @@ const isProduction = Deno.args.includes("--production");
const denoJson = JSON.parse(await Deno.readTextFile("deno.json"));
const version = denoJson.version ?? "0.0.0";

await writeHealthJson(version);

await buildStyles();

async function resolveSorobanCoreVersion(): Promise<string> {
Expand Down
Loading