Skip to content

Commit

Permalink
Merge pull request #8 from sergioramos/asset-mode
Browse files Browse the repository at this point in the history
keep asset permissions when zipping
  • Loading branch information
jaydp17 authored Sep 19, 2019
2 parents 864d11e + 1ba09ab commit 3ad2039
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function createZipperFiles(
content.push({
data: compilerOutput.assets![assetName].source,
name: `${path}${assetName}`,
mode: compilerOutput.assets![assetName].permissions,
});
});
}
Expand Down
6 changes: 5 additions & 1 deletion src/zipper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ export default async function createZip({ zipPath, zipContents }: CreateZipOptio
archive.pipe(zipStream);

for (const zipContent of zipContents) {
archive.append(zipContent.data, { name: zipContent.name });
archive.append(zipContent.data, {
name: zipContent.name,
mode: zipContent.mode,
});
}

archive.finalize();
});
}

0 comments on commit 3ad2039

Please sign in to comment.