Skip to content

Commit

Permalink
Enhanced transform functionality to include compression
Browse files Browse the repository at this point in the history
  • Loading branch information
mindflowgo committed Nov 4, 2024
1 parent 3575b77 commit 7b3b781
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ async function transformCopy(
}
}

const compressed = await getCompressedContent(src, transform)
const { destExt, data } = await getCompressedContent(src, transform)
// if this worked, adjust dest and use, else retry with getTransformedContent()
if (compressed.destExt) {
dest += compressed.destExt
if (destExt) {
dest += destExt
}
const transformedContent = compressed.data
? compressed.data
const transformedContent = destExt
? data
: await getTransformedContent(src, transform)
if (transformedContent === null) {
return { copied: false }
Expand Down

0 comments on commit 7b3b781

Please sign in to comment.