1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Initial commit for converting FrankerFaceZ to TypeScript.

This commit is contained in:
SirStendec 2023-11-13 20:47:45 -05:00
parent ba72969c51
commit b9d23accf0
86 changed files with 8673 additions and 5005 deletions

View file

@ -17,8 +17,16 @@ for(const file of fs.readdirSync(dir)) {
const config = JSON.parse(fs.readFileSync('fontello.config.json', 'utf8'));
const icons = config.glyphs.map(x => x.css);
fs.writeFileSync('src/utilities/ffz-icons.js', `'use strict';
// This is a generated file. To update it, please run: npm run font:update
fs.writeFileSync('src/utilities/ffz-icons.ts', `'use strict';
// This is a generated file. To update it, please run: pnpm font:update
/* eslint quotes: 0 */
export default ${JSON.stringify(icons, null, '\t')};`);
/**
* A list of all valid icon names in the FrankerFaceZ icon font. These
* icons can be used by adding a class to a DOM element with the name
* \`ffz-i-$\{name}\` where \`$\{name}\` is a name from this list.
*
* For example, to use the \`threads\` icon, you'd add the class
* \`ffz-i-threads\` to your element.
*/
export default ${JSON.stringify(icons, null, '\t')} as const;`);