add header file

This commit is contained in:
Francisco Dans 2015-07-30 16:38:23 +02:00
parent 9dcaf60d83
commit 4744ccd661

16
lib/header.js Normal file
View File

@ -0,0 +1,16 @@
var packageJSON = require("../package.json");
var fs = require("fs");
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;
fs.writeFile("dist/torque.uncompressed.js", headerString);
});
});