Skip to content

Commit

Permalink
Use adm-zip (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsute authored Nov 2, 2023
1 parent b52a45e commit 8f10b2c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 582 deletions.
10 changes: 6 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require("fs");
const path = require("path");

const zip = require("zip-a-folder").zip;
const AdmZip = require("adm-zip");

const src = path.join(__dirname, "src");
const dist = path.join(__dirname, "dist");
Expand Down Expand Up @@ -34,6 +34,8 @@ const ext = path.join(__dirname, "extension.zip");
.trim());
}

zip(dist, ext).then(() => {
fs.rmSync(dist, {recursive: true});
});
const zip = new AdmZip();

zip.addLocalFolderPromise(dist)
.then(() => zip.writeZip(ext))
.then(() => fs.rmSync(dist, {recursive: true}));
Loading

0 comments on commit 8f10b2c

Please sign in to comment.