mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2135] Updated tables of contents and tools (#2820)
This commit is contained in:
committed by
Eugenio Romano
parent
9e706d68e4
commit
994041fb23
@@ -17,6 +17,7 @@ var aggData = {};
|
||||
|
||||
var toolsFolderName = "tools";
|
||||
var configFileName = "doctool.config.json";
|
||||
var defaultFolder = path.resolve("..", "docs");
|
||||
|
||||
|
||||
function initPhase(aggData) {
|
||||
@@ -78,9 +79,8 @@ function updatePhase(srcFolder, destFolder, filenames, aggData) {
|
||||
});
|
||||
|
||||
if (modified)
|
||||
fs.writeFileSync(path.resolve(destFolder, filenames[i]), remark().stringify(tree));
|
||||
|
||||
//console.log(JSON.stringify(tree));
|
||||
fs.writeFileSync(path.resolve(destFolder, filenames[i]), remark().data("settings", {paddedTable: false}).stringify(tree));
|
||||
//console.log(JSON.stringify(tree));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,15 @@ if (program.args.length === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
var sourcePath;
|
||||
|
||||
|
||||
if (program.args.length > 0)
|
||||
sourcePath = path.resolve(program.args[0]);
|
||||
else
|
||||
sourcePath = defaultFolder;
|
||||
*/
|
||||
var sourcePath = path.resolve(program.args[0]);
|
||||
var sourceInfo = fs.statSync(sourcePath);
|
||||
|
||||
@@ -150,6 +158,7 @@ if (sourceInfo.isDirectory()) {
|
||||
} else if (sourceInfo.isFile()) {
|
||||
files = [ path.basename(sourcePath) ];
|
||||
sourcePath = path.dirname(sourcePath);
|
||||
destPath = path.dirname(destPath);
|
||||
}
|
||||
|
||||
files = files.filter(filename =>
|
||||
|
Reference in New Issue
Block a user