more renaming

This commit is contained in:
“chrisshank” 2024-12-02 02:09:07 -08:00
parent 597c98368c
commit cf6a253972
5 changed files with 16 additions and 4 deletions

View File

@ -37,9 +37,19 @@
folk-timer {
padding: 0.5rem;
}
p {
font-style: italic;
font-size: 1rem;
text-align: center;
}
</style>
</head>
<body>
<p>
Note: This demo only works in Chrome with
<a href="https://medium.com/@kenzic/getting-started-window-ai-in-chrome-c2982efada33">certain flags turned on.</a>
</p>
<folk-shape x="100" y="100" width="250">
<ul id="recipe" class="wprm-recipe-ingredients">
<li class="wprm-recipe-ingredient" style="list-style-type: disc" data-uid="0">

View File

@ -94,7 +94,7 @@
</ul>
<h2>Demos</h2>
<p id="disclaimer">(Make sure to checkout the dev tools everything you see is authored just in HTML!)</p>
<p id="disclaimer">(Make sure to checkout the dev tools, everything you see is authored just in HTML!)</p>
<ul>
{{ LINKS }}

View File

@ -4,12 +4,12 @@ import { defineConfig, IndexHtmlTransformContext, Plugin } from 'vite';
const demoDir = resolve(__dirname, 'demo');
const files: string[] = readdirSync(demoDir).filter((file) => file.endsWith('.html') && !file.startsWith('_'));
const files: string[] = readdirSync(demoDir).filter((file) => file.endsWith('.html'));
const input: Record<string, string> = files.reduce((acc, file) => {
acc[file.replace('.html', '')] = resolve(demoDir, file);
return acc;
}, {} as Record<string, string>);
console.log(input);
const linkGenerator = (): Plugin => {
return {
name: 'link-generator',
@ -17,7 +17,9 @@ const linkGenerator = (): Plugin => {
if (!ctx.filename.endsWith('index.html')) return;
// First, handle ungrouped files
const ungroupedFiles = files.filter((file) => !file.includes('index') && !file.match(/^\[([^\]]+)\]/));
const ungroupedFiles = files.filter(
(file) => !file.includes('index') && !file.startsWith('_') && !file.match(/^\[([^\]]+)\]/)
);
// Then handle grouped files
const groups = files