Skip to content

Commit

Permalink
remove "external" css generation (an old edge hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg authored Nov 26, 2024
1 parent 13290bf commit d16c104
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions bin/gen/piece-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,12 @@ function generateBase64Css() {
});
}

function generateExternalCss() {
themes.forEach(name => {
const classes =
colors
.map(color =>
roles
.map(
role =>
`.is2d .${role}.${color} {background-image:url('/assets/piece/${name}/${svgFilename(color, role)}')}`,
)
.join('\n'),
)
.join('\n') + '\n';

const outputFile = path.join(destDir, `${name}.external.css`);
writeFileSync(outputFile, classes, 'utf-8');
});
}

if (!existsSync(destDir)) {
mkdirSync(destDir, { recursive: true });
}

generateBase64Css();
generateExternalCss();

console.log(`✅ Generated piece CSS files in ${destDir}`);

function validateThemeDirectories() {
Expand All @@ -119,7 +100,7 @@ function validateThemeDirectories() {
process.exit(1);
}
});
})
});
}

validateThemeDirectories();

0 comments on commit d16c104

Please sign in to comment.