Skip to content

Commit

Permalink
Fix index.html build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Aug 18, 2023
1 parent 5a7ac97 commit d24a315
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion scripts/components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const aboutSection = {
]
};

const urlRegex = /\/frameworks\/([A-Za-z0-9_\-]+)\/([A-Za-z0-9_\-]+)\/?/i;
const urlRegex =
/(?:^|\/?)frameworks\/([A-Za-z0-9_\-]+)\/([A-Za-z0-9_\-]+)\/?/i;

/**
* @param {string} url
Expand Down
4 changes: 2 additions & 2 deletions scripts/routes/appViews.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from "path";
import { writeFile } from "fs/promises";
import { h } from "preact";
import { p, ensureDir, getDisplayName } from "../util.js";
import { ensureDir, getDisplayName, outputPath } from "../util.js";

/**
* @param {import('../build').Renderer} renderPage
Expand All @@ -28,7 +28,7 @@ export async function buildAppViews(renderPage, AppPage, frameworkData) {
scripts: [app.jsUrl]
});

const htmlPath = p(app.htmlUrl);
const htmlPath = outputPath(app.htmlUrl);
await ensureDir(path.dirname(htmlPath));
await writeFile(htmlPath, appHtml, "utf8");
})
Expand Down
3 changes: 1 addition & 2 deletions scripts/routes/summary.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { writeFile } from "fs/promises";
import { relative } from "path";
import { h } from "preact";
import { p, outputPath, toUrl } from "../util.js";
import { outputPath, toUrl } from "../util.js";

/**
* @param {import('../build').Renderer} renderPage
Expand Down

0 comments on commit d24a315

Please sign in to comment.