autocode
Version:
spec-driven code generator
32 lines (30 loc) • 992 B
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
module.exports = function() {
var ascii_file, ascii_text, fs, output, version_file, version_text;
fs = require('fs');
ascii_file = __dirname + "/../ascii.txt";
version_file = __dirname + "/../version.txt";
ascii_text = fs.readFileSync(ascii_file);
if (!ascii_text) {
throw new Error("Unable to load ASCII text from " + ascii_file);
}
ascii_text = ascii_text.toString();
version_text = fs.readFileSync(version_file);
if (!version_text) {
throw new Error("Unable to load version text from " + version_file);
}
version_text = "Autocode v" + version_text.toString();
output = "\n";
output += ascii_text;
output += "\n\n";
output += "=".repeat(80);
output += "\n\n";
output += " ".repeat((80 - version_text.length) / 2);
output += version_text;
output += "\n\n";
output += "=".repeat(80);
output += "\n";
return output;
};
}).call(this);