scripts/docgen/generate-docs.js
function fixLinks(file) {
  return fs.readFile(file, 'utf8').then(data => {
    const flattenedLinks = data
      .replace(/\.\.\//g, '')
      .replace(/(modules|interfaces|classes)\//g, '');
    let caseFixedLinks = flattenedLinks;
    for (const lower in lowerToUpperLookup) {
      const re = new RegExp(lower, 'g');
      caseFixedLinks = caseFixedLinks.replace(re, lowerToUpperLookup[lower]);
    }
    return fs.writeFile(file, caseFixedLinks);
  });
}
function fixLinks(file) {
  return fs.readFile(file, 'utf8').then(data => {
    const flattenedLinks = data
      .replace(/\.\.\//g, '')
      .replace(/(modules|interfaces|classes)\//g, '');
    let caseFixedLinks = flattenedLinks;
    for (const lower in lowerToUpperLookup) {
      const re = new RegExp(lower, 'g');
      caseFixedLinks = caseFixedLinks.replace(re, lowerToUpperLookup[lower]);
    }
    return fs.writeFile(file, caseFixedLinks);
  });
}
function fixLinks ( file ) { return fs . readFile ( file , 'utf8' ) . then ( data => { const flattenedLinks = data . replace ( / \.\.\/ / g , '' ) . replace ( / (modules|interfaces|classes)\/ / g , '' ) ; let caseFixedLinks = flattenedLinks ; for ( const lower in lowerToUpperLookup ) { const re = new RegExp ( lower , 'g' ) ; caseFixedLinks = caseFixedLinks . replace ( re , lowerToUpperLookup [ lower ] ) ; } return fs . writeFile ( file , caseFixedLinks ) ; } ) ; }
Reformat links to match flat structure.
@param {string} file File to fix links in.
Reformat links to match flat structure .