temp update

pull/3/head
nrfq 2021-11-05 14:27:14 -04:00
parent d3e6efe8b6
commit a03dc3d678
1 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,8 @@ function parseDirectory(directory){
const filenames = getFilesFromDir(path.resolve(directory)); const filenames = getFilesFromDir(path.resolve(directory));
filenames.forEach((filename) => { filenames.forEach((filename) => {
console.log(filename); console.log(filename);
const doc = fs.readFileSync(`${filename}`); const doc = fs.readFileSync(filename);
console.log(doc);
let children, errors = parseMarkdown(doc); let children, errors = parseMarkdown(doc);
const langCode = getLangFromFilename(filename); const langCode = getLangFromFilename(filename);
let docJson = { let docJson = {
@ -168,7 +169,7 @@ function parseAll(dirArray){
type: 'root', type: 'root',
children: rootChildren children: rootChildren
} }
fs.writeFile('./parser/fpb.json', JSON.stringify(rootJson, null, 3), function(err) { fs.writeFileSync('./parser/fpb.json', JSON.stringify(rootJson, null, 3), function(err) {
if (err) { if (err) {
console.log(err); console.log(err);
} }