scripts/docgen/generate-docs.js
function generateTempHomeMdFile(tocRaw, homeRaw) {
  const { toc } = yaml.safeLoad(tocRaw);
  let tocPageLines = [homeRaw, '# API Reference'];
  toc.forEach(group => {
    tocPageLines.push(`\n## [${group.title}](${stripPath(group.path)}.html)`);
    group.section.forEach(item => {
      tocPageLines.push(`- [${item.title}](${stripPath(item.path)}.html)`);
    });
  });
  return fs.writeFile(tempHomePath, tocPageLines.join('\n'));
}
function generateTempHomeMdFile(tocRaw, homeRaw) {
  const { toc } = yaml.safeLoad(tocRaw);
  let tocPageLines = [homeRaw, '# API Reference'];
  toc.forEach(group => {
    tocPageLines.push(`\n## [${group.title}](${stripPath(group.path)}.html)`);
    group.section.forEach(item => {
      tocPageLines.push(`- [${item.title}](${stripPath(item.path)}.html)`);
    });
  });
  return fs.writeFile(tempHomePath, tocPageLines.join('\n'));
}
function generateTempHomeMdFile ( tocRaw , homeRaw ) { const { toc } = yaml . safeLoad ( tocRaw ) ; let tocPageLines = [ homeRaw , '# API Reference' ] ; toc . forEach ( group => { tocPageLines . push ( ` \n ${ group . title } ${ stripPath ( group . path ) } ` ) ; group . section . forEach ( item => { tocPageLines . push ( ` ${ item . title } ${ stripPath ( item . path ) } ` ) ; } ) ; } ) ; return fs . writeFile ( tempHomePath , tocPageLines . join ( '\n' ) ) ; }
Generates temporary markdown file that will be sourced by Typedoc to
create index.html.

@param {string} tocRaw
@param {string} homeRaw
Generates temporary markdown file that will be sourced by Typedoc to create index . html .