Files
stack/agents/dewey/work/wui/checks/assets.mjs
T

11 lines
737 B
JavaScript

import '../brand.js';
import {mkdir,writeFile} from 'node:fs/promises';
const out=new URL('../assets/logos/',import.meta.url);
await mkdir(out,{recursive:true});
for(const l of Brand.logos){
await writeFile(new URL(`${l.name.toLowerCase()}.svg`,out),`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 56" fill="#215fac" role="img" aria-label="Mosaic Stack ${l.name} concept">${l.paths}</svg>\n`);
}
const palettes=Brand.palettes.map(p=>({...p,modes:Object.fromEntries(['light','dim','dark'].map(m=>[m,Brand.tokens(p,m)]))}));
await writeFile(new URL('../assets/palettes.json',import.meta.url),JSON.stringify({prototype:true,palettes},null,2)+'\n');
console.log('Generated 3 original SVG assets and 30 palette/mode token sets.');