Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2011 at 05:41 UTC
Updated:
29 Jul 2014 at 20:07 UTC
Since #865536: drupal_add_js() is missing the 'browsers' option got in, We now have a lot of similar code between drupal_get_js and drupal_get_css which we should consolidate.
Specifically drupal_pre_render_scripts, drupal_pre_render_styles, drupal_group_js, drupal_group_css, drupal_aggregate_js, drupal_aggregate_css.
These 6 functions can probably be combine into 3.
Comments
Comment #1
fubhy commentedI was thinking the same initially, but after looking at the code more carefully and actually trying to combine these 6 functions I figured that it would require quite a bunch of conditional statements and thereby make it overly complex (and hard to read). For example the aggregation groups are built differently (no media queries for js, inline js doesn't get preprocessed in the case of js, js has settings while css doesn't, etc. ...
I think it is fine the way it is.
Do you mind if I close this?