From df99c918d175e54d536ab73a38db2e62522bec2b Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Thu, 30 Jul 2015 16:58:17 +0200 Subject: [PATCH] adds header to uncompressed dists --- lib/header.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/header.js b/lib/header.js index fa0162f..9ca850f 100644 --- a/lib/header.js +++ b/lib/header.js @@ -5,12 +5,17 @@ var headerString = "/**\n" headerString += "Torque " + packageJSON.version + "\n"; headerString += packageJSON.description + "\n"; headerString += "https://github.com/cartodb/torque"; -headerString += "\n\n"; -fs.readFile("LICENSE.txt", 'utf8', function(err, data) { - headerString += data; - headerString += "\n**/\n\n\n"; - fs.readFile("dist/torque.uncompressed.js", 'utf8', function(err, torque) { - headerString += torque; +headerString += "\n**/\n\n\n"; +fs.readFile("dist/torque.uncompressed.js", 'utf8', function(err, torque) { + if(!err){ + var torqueString = headerString + torque; fs.writeFile("dist/torque.uncompressed.js", headerString); - }); + } +}); + +fs.readFile("dist/torque.full.uncompressed.js", 'utf8', function(err, torque) { + if(!err){ + var torqueString = headerString + torque; + fs.writeFile("dist/torque.full.uncompressed.js", headerString); + } });