Replaces references to non-optimized scripts or stylesheets into a set of HTML files (or any templates/views)