From ab021356435acba61c616ba1516a067c221ba2da Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Mon, 16 Jan 2012 23:26:30 -0800 Subject: [PATCH] Factor out taring process. --- node/utils/Minify.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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