Skip to content

Commit

Permalink
ci: remove digits.
Browse files Browse the repository at this point in the history
  • Loading branch information
knightedcodemonkey committed Jul 1, 2024
1 parent 318ed43 commit 8451cfd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/duel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { argv, platform } from 'node:process'
import { join, dirname, resolve, relative, parse } from 'node:path'
import { spawn } from 'node:child_process'
import { writeFile, rm, rename, mkdir, copyFile } from 'node:fs/promises'
import { writeFile, rm, rename, mkdir, copyFile, lstat } from 'node:fs/promises'
import { randomBytes } from 'node:crypto'
import { performance } from 'node:perf_hooks'

Expand Down Expand Up @@ -130,7 +130,7 @@ const duel = async args => {
}

if (success) {
const subDir = join(projectDir, `_${hex}_`)
const subDir = join(projectDir, `_${hex.replace(/\d/g, 'A')}_`)
const absoluteDualOutDir = join(
projectDir,
isCjsBuild ? join(outDir, 'cjs') : join(outDir, 'esm'),
Expand All @@ -151,16 +151,13 @@ const duel = async args => {
const dest = join(subDir, relative(projectDir, file).replace(/^(\.\.\/)*/, ''))
const { dir } = parse(dest)

await mkdir(dir, { recursive: true })
/*
try {
await lstat(dir)
} catch (err) {
if (err.code === 'ENOENT') {
await mkdir(dir, { recursive: true })
}
}
*/

return copyFile(file, dest)
}
Expand Down

0 comments on commit 8451cfd

Please sign in to comment.