mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
19 lines
560 B
JavaScript
19 lines
560 B
JavaScript
import upperCamelCase from 'upperCamelCase';
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
/**
|
|
* Generates a componentName of a String.
|
|
*
|
|
* @param {string} iconName
|
|
*/
|
|
export const generateComponentName = (iconName) => iconName === "github" ? "GitHub" : upperCamelCase(iconName);
|
|
|
|
export const resetFile = (fileName, outputDirectory) => fs.writeFileSync(path.join(outputDirectory, fileName), "", "utf-8");
|
|
|
|
export const writeFile = (content, fileName, outputDirectory) => fs.appendFileSync(
|
|
path.join(outputDirectory, fileName),
|
|
content,
|
|
"utf-8"
|
|
);
|