testing
parent
a03dc3d678
commit
54b4d48783
2
index.js
2
index.js
|
@ -58,6 +58,7 @@ function getMediaFromDirectory(dir){
|
||||||
|
|
||||||
let parseMarkdown = function(doc){
|
let parseMarkdown = function(doc){
|
||||||
let tree = remark.parse(doc).children;
|
let tree = remark.parse(doc).children;
|
||||||
|
console.log(tree);
|
||||||
let children = []; // This will go into root object later
|
let children = []; // This will go into root object later
|
||||||
let errors = [];
|
let errors = [];
|
||||||
let currentDepth = 3;
|
let currentDepth = 3;
|
||||||
|
@ -127,7 +128,6 @@ function parseDirectory(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 = {
|
||||||
|
|
Loading…
Reference in New Issue