mirror of https://github.com/curbengh/hexo-yam
refactor: use new method of accessing zlib constants
"Accessing the constants directly from the module is currently still possible but is deprecated." https://nodejs.org/api/zlib.html#zlib_zlib_constants
This commit is contained in:
parent
9b52aed8e4
commit
369bad96b7
|
@ -115,7 +115,7 @@ function logicGzip () {
|
|||
assetPath.on('end', () => {
|
||||
if (assetTxt.length) {
|
||||
// gzip compress using highest level
|
||||
zlib.gzip(assetTxt, { level: zlib.Z_BEST_COMPRESSION }, (err, Input) => {
|
||||
zlib.gzip(assetTxt, { level: zlib.constants.Z_BEST_COMPRESSION }, (err, Input) => {
|
||||
if (!err) {
|
||||
// Save the compressed file to .gz
|
||||
route.set(path + '.gz', Input)
|
||||
|
|
Loading…
Reference in New Issue