mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-3279] Initial refactoring of doc tools (#3541)
* [ADF-3279] Added timing option * [ADF-3279] Updated to keep md files in memory during processing * [ADF-3279] Changed read phase to use stored Markdown trees * [ADF-3279] Renamed tool functions and removed obsolete ones * [ADF-3279] Added progress bar and better error message handling
This commit is contained in:
committed by
Eugenio Romano
parent
0255da80a4
commit
821916fbd7
@@ -11,10 +11,10 @@ var unist = require("../unistHelpers");
|
||||
var tutFolder = path.resolve("docs", "tutorials");
|
||||
var templateFolder = path.resolve("tools", "doc", "templates");
|
||||
var userGuideFolder = path.resolve("docs", "user-guide");
|
||||
function initPhase(aggData) { }
|
||||
exports.initPhase = initPhase;
|
||||
function readPhase(tree, pathname, aggData) { }
|
||||
exports.readPhase = readPhase;
|
||||
function processDocs(tree, pathname, aggData, errorMessages) {
|
||||
aggPhase(aggData);
|
||||
}
|
||||
exports.processDocs = processDocs;
|
||||
function aggPhase(aggData) {
|
||||
var indexDocData = getIndexDocData();
|
||||
var templateName = path.resolve(templateFolder, "tutIndex.ejs");
|
||||
@@ -33,11 +33,6 @@ function aggPhase(aggData) {
|
||||
});
|
||||
fs.writeFileSync(tutIndexFile, remark().use(frontMatter, { type: 'yaml', fence: '---' }).data("settings", { paddedTable: false, gfm: false }).stringify(tutIndexMD));
|
||||
}
|
||||
exports.aggPhase = aggPhase;
|
||||
function updatePhase(tree, pathname, aggData) {
|
||||
return false;
|
||||
}
|
||||
exports.updatePhase = updatePhase;
|
||||
function getIndexDocData() {
|
||||
var indexFile = path.resolve(userGuideFolder, "summary.json");
|
||||
var summaryArray = JSON.parse(fs.readFileSync(indexFile, "utf8"));
|
||||
|
Reference in New Issue
Block a user