-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
603ccaf
commit d9e095b
Showing
6 changed files
with
41 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,6 @@ docs | |
|
||
# Root Exports | ||
/*.js | ||
|
||
# Lint Dir | ||
/lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import { unlink } from 'node:fs/promises' | ||
import { iterateDir } from './common.mjs' | ||
import { rm, unlink } from 'node:fs/promises' | ||
import { isLint, iterateDir, LINT_DIR } from './common.mjs' | ||
|
||
const entries = await iterateDir() | ||
const jobs = entries.map(async ([name]) => { | ||
try { | ||
await unlink(`./${name}`) | ||
} catch { | ||
// Pass | ||
} | ||
}) | ||
const lint = isLint() | ||
|
||
await Promise.all(jobs) | ||
if (lint) { | ||
await rm(LINT_DIR, { force: true, recursive: true }) | ||
} else { | ||
const entries = await iterateDir() | ||
const jobs = entries.map(async ([name]) => { | ||
try { | ||
await unlink(`./${name}`) | ||
} catch { | ||
// Pass | ||
} | ||
}) | ||
|
||
await Promise.all(jobs) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters