Our client uses an external website for some of their pages. This provider does not enable us to theme their website directly, but they do allow us to load a single JS file from the Drupal site that we maintain.
We create this JS file through a Drupal route/controller, assembling the header and footer blocks, including CSS and JS files, and inserting them into the content by appending them to the appropriate elements.
We've ported all of the functionality to Drupal 8 from 7 and it's more efficient than before. However, we used to use drupal_build_css_cache() to aggregate the subset of CSS files from themes and modules that we need before injecting them into the website's head.
Keeping in mind that all we're delivering to the external website is a single JS file (so we can't attach a library in the usual way), is there a way of programatically creating an aggregated CSS file in Drupal 8, as that function used to do?