build/convert-readme.js
function exportReadme(readmePath) {
    const readmePaths = path.resolve(process.cwd(), srcDir);

    glob(readmePaths, void(0), function(error, files) {
        files.forEach((filePath) => {
            let documentation = startFile;
            const markdown = fs.readFileSync(filePath, "utf8");
            const exportPath = filePath.replace(/README\.md/, readmePath);

            if (markdown.length !== 0) {
                documentation += md.render(markdown);
            } else {
                documentation += emptyFile;
            }

            documentation += endFile;
            
            if (!fs.existsSync(exportPath)){
                fs.mkdirSync(exportPath);
            }

            fs.writeFileSync(path.resolve(exportPath, "documentation.tsx"), documentation);
        });
    });
}
function exportReadme(readmePath) {
    const readmePaths = path.resolve(process.cwd(), srcDir);

    glob(readmePaths, void(0), function(error, files) {
        files.forEach((filePath) => {
            let documentation = startFile;
            const markdown = fs.readFileSync(filePath, "utf8");
            const exportPath = filePath.replace(/README\.md/, readmePath);

            if (markdown.length !== 0) {
                documentation += md.render(markdown);
            } else {
                documentation += emptyFile;
            }

            documentation += endFile;
            
            if (!fs.existsSync(exportPath)){
                fs.mkdirSync(exportPath);
            }

            fs.writeFileSync(path.resolve(exportPath, "documentation.tsx"), documentation);
        });
    });
}
function exportReadme ( readmePath ) { const readmePaths = path . resolve ( process . cwd ( ) , srcDir ) ; glob ( readmePaths , void ( 0 ) , function ( error , files ) { files . forEach ( ( filePath ) => { let documentation = startFile ; const markdown = fs . readFileSync ( filePath , "utf8" ) ; const exportPath = filePath . replace ( / README\.md / , readmePath ) ; if ( markdown . length !== 0 ) { documentation += md . render ( markdown ) ; } else { documentation += emptyFile ; } documentation += endFile ; if ( ! fs . existsSync ( exportPath ) ) { fs . mkdirSync ( exportPath ) ; } fs . writeFileSync ( path . resolve ( exportPath , "documentation.tsx" ) , documentation ) ; } ) ; } ) ; }
Function to create string exports of a given path
Function to create string exports of a given path