mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-06-01 23:58:30 -04:00
⚡ utils cleanup
This commit is contained in:
parent
c380a50a7c
commit
f57f1b2974
1 changed files with 0 additions and 19 deletions
|
@ -1,19 +0,0 @@
|
|||
import { resolve } from "path";
|
||||
import { access, mkdirSync, writeFileSync } from "fs";
|
||||
|
||||
interface WriteSchemaData {
|
||||
path: string;
|
||||
content: string;
|
||||
fileName: string;
|
||||
}
|
||||
|
||||
const writeSchemaData = ({ path, content, fileName }: WriteSchemaData) => {
|
||||
access(path, (isAccessible) => {
|
||||
if (!isAccessible) {
|
||||
mkdirSync(path, { recursive: true });
|
||||
}
|
||||
});
|
||||
writeFileSync(resolve(path, fileName), content);
|
||||
};
|
||||
|
||||
export { writeSchemaData };
|
Loading…
Add table
Add a link
Reference in a new issue