build-system/tasks/check-links.js
/**
 * Reads the raw contents in the given markdown file, filters out localhost
 * links (because they do not resolve on Travis), and checks for dead links.
 *
 * @param {string} markdownFile Path of markdown file, relative to src root.
 * @return {Promise} Used to wait until the async link checker is done.
 */
Reads the raw contents in the given markdown file, filters out localhost
links (because they do not resolve on Travis), and checks for dead links.

@param {string} markdownFile Path of markdown file, relative to src root.
@return {Promise} Used to wait until the async link checker is done.
Reads the raw contents in the given markdown file filters out localhost links ( because they do not resolve on Travis ) and checks for dead links . @param { string } markdownFile Path of markdown file relative to src root . @return { Promise } Used to wait until the async link checker is done .
function runLinkChecker(markdownFile) {
  if (!fs.existsSync(markdownFile)) {
    return Promise.resolve();
  }
  var markdown = fs.readFileSync(markdownFile).toString();
  var filteredMarkdown = filterWhitelistedLinks(markdown);
  var opts = {
    baseUrl : 'file://' + path.dirname(path.resolve((markdownFile)))
  };
  return markdownLinkCheck(filteredMarkdown, opts);
}
function runLinkChecker ( markdownFile ) { if ( ! fs . existsSync ( markdownFile ) ) { return Promise . resolve ( ) ; } var markdown = fs . readFileSync ( markdownFile ) . toString ( ) ; var filteredMarkdown = filterWhitelistedLinks ( markdown ) ; var opts = { baseUrl : 'file://' + path . dirname ( path . resolve ( ( markdownFile ) ) ) } ; return markdownLinkCheck ( filteredMarkdown , opts ) ; }
Reads the raw contents in the given markdown file, filters out localhost
 links (because they do not resolve on Travis), and checks for dead links.
Reads the raw contents in the given markdown file filters out localhost links ( because they do not resolve on Travis ) and checks for dead links .
// Skip files that were deleted by the PR.