diff --git a/node/utils/Minify.js b/node/utils/Minify.js index d3c8831a..03f511f4 100644 --- a/node/utils/Minify.js +++ b/node/utils/Minify.js @@ -208,14 +208,9 @@ function _handle(req, res, jsFilename, jsFiles) { //put all together and write it into a file function(callback) { - //put all javascript files in an array - var values = []; - for(var i in jsFiles) - { - values.push(fileValues[jsFiles[i]]); - } - //minify all javascript files to one + var values = []; + tarCode(jsFiles, fileValues, function (content) {values.push(content)}); var result = compressJS(values); async.parallel([ @@ -291,18 +286,21 @@ function _handle(req, res, jsFilename, jsFiles) { { if(ERR(err)) return; - for(var i=0;i