scripts/docgen/generate-docs.js
function writeGeneratedFileList(htmlFiles) {
  const fileList = htmlFiles.map(filename => {
    return {
      title: filename,
      path: `${devsitePath}${filename}`
    };
  });
  const generatedTocYAML = yaml.safeDump({ toc: fileList });
  return fs
    .writeFile(`${docPath}/_toc_autogenerated.yaml`, generatedTocYAML)
    .then(() => htmlFiles);
}
function writeGeneratedFileList(htmlFiles) {
  const fileList = htmlFiles.map(filename => {
    return {
      title: filename,
      path: `${devsitePath}${filename}`
    };
  });
  const generatedTocYAML = yaml.safeDump({ toc: fileList });
  return fs
    .writeFile(`${docPath}/_toc_autogenerated.yaml`, generatedTocYAML)
    .then(() => htmlFiles);
}
function writeGeneratedFileList ( htmlFiles ) { const fileList = htmlFiles . map ( filename => { return { title : filename , path : ` ${ devsitePath } ${ filename } ` } ; } ) ; const generatedTocYAML = yaml . safeDump ( { toc : fileList } ) ; return fs . writeFile ( ` ${ docPath } ` , generatedTocYAML ) . then ( ( ) => htmlFiles ) ; }
Writes a _toc_autogenerated.yaml as a record of all files that were
autogenerated.  Helpful to tech writers.

@param {Array} htmlFiles List of html files found in generated dir.
Writes a _toc_autogenerated . yaml as a record of all files that were autogenerated . Helpful to tech writers .