Files
lucide/tools/build-helpers/src/readFile.ts
T
Eric Fennis 3e644fda2d chore(scripts): Refactor scripts to typescript (#3316)
* 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
2025-06-18 15:47:24 +02:00

13 lines
351 B
TypeScript

/* eslint-disable import/prefer-default-export */
import fs from 'fs/promises';
import path from 'path';
/**
* Reads the file contents.
*
* @param {string} path
* @returns {string} The contents of a file
*/
export const readFile = (filePath: string): Promise<string | Buffer> =>
fs.readFile(path.resolve(__dirname, '../', filePath), 'utf-8');