perf(site): serve responsive WebP and compressed Hub videos
This commit is contained in:
@@ -9,7 +9,7 @@ import { execFileSync } from 'node:child_process';
|
||||
test('image opening is opt-in per carousel and survives ordinary model rendering', async t => {
|
||||
const root = await mkdtemp(join(tmpdir(), 'nodedc-carousel-'));
|
||||
t.after(() => rm(root, { recursive: true, force: true }));
|
||||
for (const path of ['tools', 'templates', 'content']) await cp(new URL('../'+path, import.meta.url), join(root,path), {recursive:true});
|
||||
for (const path of ['tools', 'templates', 'content', 'assets/uploads/optimized']) await cp(new URL('../'+path, import.meta.url), join(root,path), {recursive:true});
|
||||
const modelPath = join(root, 'content/pages/home.json');
|
||||
const page = JSON.parse(await readFile(modelPath, 'utf8'));
|
||||
const galleries = page.regions.flatMap(r=>r.blocks).filter(b=>b.content?.sliderItems);
|
||||
|
||||
Reference in New Issue
Block a user