Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
minify(options)
.then(() => {
utils
.getFilesizeGzippedInBytes(options.output)
.then(sizeGzip => {
resolve({
compressorLabel: options.compressorLabel,
compressor: options.compressor,
size: utils.getFilesizeInBytes(options.output),
sizeGzip: sizeGzip
});
})
.catch(reject);
})
.catch(reject);
});
};