refactor(compiler)!: move component generation to core

This commit is contained in:
Rahim
2026-06-19 19:37:09 -07:00
parent b2c6b3489f
commit f64acdfd15
158 changed files with 2849 additions and 712 deletions
+24
View File
@@ -0,0 +1,24 @@
import { pascalCase } from '@videojs/utils/string';
const PASCAL_CASE_ICON_NAME_OVERRIDES = {
'airplay-enter': 'AirPlayEnter',
'airplay-exit': 'AirPlayExit',
};
/** @param {string} name */
function iconComponentName(name) {
return `${PASCAL_CASE_ICON_NAME_OVERRIDES[name] ?? pascalCase(name)}Icon`;
}
/** @param {string} set */
const iconConfig = (set) => ({
components: [
{
files: `./src/assets/${set}/*.svg`,
name: iconComponentName,
},
],
output: `./src/__generated__/${set}.ts`,
});
export default [iconConfig('default'), iconConfig('minimal')];