Add support for multi-languages books in JSON format

This commit is contained in:
Samy Pessé
2014-05-20 23:21:12 +02:00
parent 62ec695dc8
commit ea7ad10e8a
+17
View File
@@ -40,6 +40,23 @@ Generator.prototype.convertFile = function(content, input) {
});
};
// Generate languages index
Generator.prototype.langsIndex = function(langs) {
var that = this;
var json = {
langs: langs.list
};
return Q()
.then(function() {
return fs.writeFile(
path.join(that.options.output, "langs.json"),
JSON.stringify(json, null, 4)
);
});
};
Generator.prototype.finish = function() {
// ignore
};