stampIndexHtml function

String stampIndexHtml(
  1. String html,
  2. String buildId
)

Returns html (an index.html) stamped with buildId: meta tag injected and script references outside HTML comments cache-busted. Idempotent.

Implementation

String stampIndexHtml(String html, String buildId) => injectBuildIdMeta(
  _outsideComments(
    unstampIndexHtml(html),
    (String part) => cacheBustScripts(part, buildId),
  ),
  buildId,
);