[ci] format
This commit is contained in:
parent
3d56123f25
commit
7f99d0de9e
1 changed files with 10 additions and 10 deletions
|
@ -100,19 +100,19 @@ export function viteID(filePath: URL): string {
|
|||
|
||||
/** An fs utility, similar to `rimraf` or `rm -rf` */
|
||||
export function removeDir(_dir: URL): void {
|
||||
const dir = fileURLToPath(_dir);
|
||||
fs.rmSync(dir, {recursive: true, force: true});
|
||||
const dir = fileURLToPath(_dir);
|
||||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
export function emptyDir(_dir: URL, skip?: Set<string>): void {
|
||||
const dir = fileURLToPath(_dir);
|
||||
if (!fs.existsSync(dir)) return undefined;
|
||||
for (const file of fs.readdirSync(dir)) {
|
||||
if (skip?.has(file)) {
|
||||
continue;
|
||||
}
|
||||
fs.rmSync(path.resolve(dir, file), {recursive: true, force: true});
|
||||
}
|
||||
const dir = fileURLToPath(_dir);
|
||||
if (!fs.existsSync(dir)) return undefined;
|
||||
for (const file of fs.readdirSync(dir)) {
|
||||
if (skip?.has(file)) {
|
||||
continue;
|
||||
}
|
||||
fs.rmSync(path.resolve(dir, file), { recursive: true, force: true });
|
||||
}
|
||||
}
|
||||
|
||||
// Vendored from https://github.com/genmon/aboutfeeds/blob/main/tools/pretty-feed-v3.xsl
|
||||
|
|
Loading…
Reference in a new issue