Skip to content

Commit

Permalink
refactor: try cp.
Browse files Browse the repository at this point in the history
  • Loading branch information
knightedcodemonkey committed Sep 30, 2024
1 parent 895defc commit 88b1661
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/duel.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,7 @@ const duel = async args => {
await mkdir(subDir)
await Promise.all(
compileFiles.map(
async file => {
const dest = join(
subDir,
relative(projectDir, file).replace(/^(\.\.\/)*/, ''),
)
const { dir } = parse(dest)

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

return copyFile(file, dest)
},
//cp(file, join(subDir, relative(projectDir, file).replace(/^(\.\.\/)*/, ''))),
cp(file, join(subDir, relative(projectDir, file).replace(/^(\.\.\/)*/, ''))),

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 22.9.0)

'cp' is not defined

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 22.9.0)

'file' is not defined

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 22.9.0)

'file' is not defined

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (macos-latest, 22.9.0)

'cp' is not defined

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (macos-latest, 22.9.0)

'file' is not defined

Check failure on line 150 in src/duel.js

View workflow job for this annotation

GitHub Actions / CI (macos-latest, 22.9.0)

'file' is not defined
),
)

Expand Down

0 comments on commit 88b1661

Please sign in to comment.