@mokr/core
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -12,2 +12,9 @@ import fs from "node:fs"; | ||
} | ||
/** | ||
* Removes all files from a directory. | ||
*/ | ||
export async function emptyDirectory({ directory }) { | ||
await removeDirectory({ directory }); | ||
return createDirectory({ directory }); | ||
} | ||
export async function isDirectory({ directory }) { | ||
@@ -14,0 +21,0 @@ try { |
@@ -11,2 +11,3 @@ import { PluginType, validateType } from "./plugin.js"; | ||
"lib", | ||
"nestjs", | ||
"next", | ||
@@ -13,0 +14,0 @@ "sanity", |
{ | ||
"name": "@mokr/core", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Core moker functions", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/hongaar/moker", |
@@ -9,2 +9,6 @@ type DirOption = { | ||
export declare function createDirectory({ directory }: DirOption): Promise<string | undefined>; | ||
/** | ||
* Removes all files from a directory. | ||
*/ | ||
export declare function emptyDirectory({ directory }: DirOption): Promise<string | undefined>; | ||
export declare function isDirectory({ directory }: DirOption): Promise<boolean>; | ||
@@ -11,0 +15,0 @@ export declare function isReadableAndWritableDirectory({ directory }: DirOption): Promise<boolean>; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70279
1518