1

I'm trying to understand how I can have the whole list of the CSS, JavaScript, and the others files declared with the libraries method (or added in any right way to Drupal).

Earth would be a better place with a function like get_all_assets().

We are planning to create a less files aggregator and compiler ...

  • Not sure why you need to do this? Drupal does a great job of aggregating and minimizing css and JS already. And if you don't like the default method, there is the advance aggregation model that gives you a lot of flexibility. – CG Monroe Jul 16 '18 at 17:26
  • Assets are not generally/necessarily global. It would have to be get_all_assets_in($some_request) – Clive Jul 16 '18 at 18:45
  • 1
    With aggregation disabled all you need to do is to inspect your site's HTML source from inside your browser. – leymannx Jul 16 '18 at 19:46
  • 1
    Also drupal.org/project/advagg already exists. Don't reinvent the wheel ;) – leymannx Jul 16 '18 at 19:47
  • What are you talking about? I need a way to get the whole tree of each asset of my Drupal 8 installation (into a structured way, for instance an array). I don't need to aggregate or optimize! Do you know how to get the full tree of css, js, less files added to Drupal? Thanks – UnMoscerinoNelWeb Jul 17 '18 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.