diff options
Diffstat (limited to 'lib/generators')
-rw-r--r-- | lib/generators/json.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/generators/json.js b/lib/generators/json.js index 6dc468e..2e8c731 100644 --- a/lib/generators/json.js +++ b/lib/generators/json.js @@ -20,7 +20,7 @@ Generator.prototype.finish = function() { }; Generator.prototype.writeParsedFile = function(page, input) { var that = this; var json = { - progress: [], + progress: page.progress, sections: page.sections }; @@ -45,16 +45,19 @@ Generator.prototype.langsIndex = function(langs) { return Q() .then(function() { + // Read readme from main language return fs.readFile( path.join(that.options.output, mainLang, readme) ); }) .then(function(content) { + // Extend it with infos about the languages var json = JSON.parse(content); _.extend(json, { langs: langs }); + // Write it as README.json return fs.writeFile( path.join(that.options.output, "README.json"), JSON.stringify(json, null, 4) |