mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-17 14:28:25 +00:00
* Adjust typescript types * adjust types * fix types in all helper files * Fix types * Migrate js files to ts files * Refactor to TS files * Rename extentions * Adjust imports * Fix builds * Update lockfile * Fix last typescript migration * Fix entry path @lucide/outline-svg * Fix types * add checkout step * format files * Format files
22 lines
528 B
TypeScript
22 lines
528 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
import { writeFile } from './writeFile.ts';
|
|
|
|
/**
|
|
* writes content to a file if it does not exist
|
|
*
|
|
* @param {string} content
|
|
* @param {string} fileName
|
|
* @param {string} outputDirectory
|
|
*/
|
|
export const writeFileIfNotExists = (
|
|
content: string,
|
|
fileName: string,
|
|
outputDirectory: string,
|
|
): void => {
|
|
if (!fs.existsSync(path.join(outputDirectory, fileName))) {
|
|
writeFile(content, fileName, outputDirectory);
|
|
}
|
|
};
|