import { readFile } from 'fs-extra'; import { rootDir, insertContentIntoFile } from '../tool-utils'; async function getReadmeMd() { return readFile(`${rootDir}/README.md`, 'utf8'); } async function createDownloadButtonsHtml(readmeMd: string): Promise> { const output: Record = {}; output['windows'] = readmeMd.match(/()/)[0]; output['macOs'] = readmeMd.match(/()/)[0]; output['linux'] = readmeMd.match(/()/)[0]; output['android'] = readmeMd.match(/(', '', desktopButtonsHtml.join(' ')); await insertContentIntoFile(`${rootDir}/readme/download.md`, '', '', mobileButtonsHtml.join(' ')); }