Skip to content

Commit

Permalink
Fixed global settings for JS/CSS/HTML minificator.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed May 23, 2024
1 parent 0b00525 commit daf9e12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion minificators.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ exports.htmlremovecomments = function(value) {
return value;
};

exports.merge = async function(filename, filenames, minify = true) {
exports.merge = async function(filename, filenames, minify) {

// @filename {String/Boolean}

Expand Down Expand Up @@ -423,6 +423,7 @@ async function mergedownload(url, minify = true) {
}

async function mergefile(filename, minify) {

return new Promise(function(resolve) {

F.Fs.readFile(filename, 'utf8', function(err, response) {
Expand All @@ -445,6 +446,9 @@ async function mergefile(filename, minify) {
ext = ext.toLowerCase();
}

if (minify === undefined)
minify = !!F.config['$minify' + ext];

var output = { ext: ext };

response = response.ROOT();
Expand Down

0 comments on commit daf9e12

Please sign in to comment.