Skip to content

Commit

Permalink
zip build files better (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavdid authored Apr 23, 2020
1 parent 8b9a092 commit cfb1205
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/cli/src/utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ const ignore = require('ignore');
const gitIgnore = require('parse-gitignore');
const semver = require('semver');

const {
constants: { Z_BEST_COMPRESSION }
} = require('zlib');

const constants = require('../constants');

const {
Expand Down Expand Up @@ -170,7 +174,7 @@ const writeZipFromPaths = (dir, zipPath, paths) => {
return new Promise((resolve, reject) => {
const output = fs.createWriteStream(zipPath);
const zip = archiver('zip', {
store: true // Sets the compression method to STORE.
zlib: { level: Z_BEST_COMPRESSION }
});

// listen for all archive data to be written
Expand Down

0 comments on commit cfb1205

Please sign in to comment.