code: function inlineTemplate(content, urlResolver) {
    return content.replace(/templateUrl:\s*(['"])([^\1]+?\.html)\1/g, function (fullMatch, quote, templateUrl) {
      const templateFile = urlResolver(templateUrl);
      const templateContent = fs.readFileSync(templateFile, 'utf-8');
      const shortenedTemplate = templateContent
        .replace(/([\n\r]\s*)+/gm, ' ')
        .replace(/"/g, '\\"');
      return `template: "${shortenedTemplate}"`;
    });
  }
docs: Inline the templates for a source file. Simply search for instances of `templateUrl: ...` and
  replace with `template: ...` (with the content of the file included).
  @param content {string} The source file's content.
  @param urlResolver {Function} A resolver that takes a URL and return a path.
  @return {string} The content with all templates inlined.