summaryrefslogtreecommitdiffstats
path: root/lib/generators
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generators')
-rw-r--r--lib/generators/json.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/generators/json.js b/lib/generators/json.js
index 3023b42..02a0536 100644
--- a/lib/generators/json.js
+++ b/lib/generators/json.js
@@ -12,7 +12,7 @@ var Generator = function() {
};
util.inherits(Generator, BaseGenerator);
-// Ignore soem methods
+// Ignore some methods
Generator.prototype.transferFile = function(input) { };
Generator.prototype.finish = function() { };
@@ -35,13 +35,12 @@ Generator.prototype.writeParsedFile = function(page, input) {
// Generate languages index
// Contains the first languages readme and langs infos
-/*Generator.prototype.langsIndex = function(langs) {
+Generator.prototype.langsIndex = function(langs) {
var that = this;
- if (langs.list.length == 0) return Q.reject("Need at least one language");
+ if (langs.length == 0) return Q.reject("Need at least one language");
- var mainLang = _.first(langs.list).lang;
- console.log("Main language is", mainLang);
+ var mainLang = _.first(langs).lang;
return Q()
.then(function() {
@@ -52,7 +51,7 @@ Generator.prototype.writeParsedFile = function(page, input) {
.then(function(content) {
var json = JSON.parse(content);
_.extend(json, {
- langs: langs.list
+ langs: langs
});
return fs.writeFile(
@@ -60,6 +59,6 @@ Generator.prototype.writeParsedFile = function(page, input) {
JSON.stringify(json, null, 4)
);
});
-};*/
+};
module.exports = Generator;