Allow some excluded files (e.g. jquery.js) before aggregation?
joshk - August 22, 2008 - 21:32
| Project: | Javascript Aggregator |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Description
I'm seeing an issue where jquery 1.2.6 (I live dangerously) will not work correctly if its aggregated/compressed. However, if I exclude it, it's added after the aggregated hunk, meaning all jquery-dependent scripts are now broken.
Any chance to extend the module to allow "exclude before" and "exclude after" as options, or the like?

#1
having the same issue with jquery. am working on a fix which allows one to specify which scripts to ignore to be loaded BEFORE and AFTER aggregated scripts. Working fine for me. I added to my existing file which also includes the JsMin patch, so it might take me a day or so before I can post a clean patch for release
#2
Just change the part where it says array_unshift($scripts_js_links, base_path().$jsfile); to array_push($scripts_js_links, base_path().$jsfile); Then it gets loaded before the aggregated file
#3
Finally had some time to create patches, attached below. I've included a patch to original that breaks up exclude options into "pre" and "post" and allows setting via an additional textfield.
I've also added another patch in case anyone is using the JSMin patch referenced here: http://drupal.org/node/251140.
Both patches are working successfully for me on a prod site.
Hope that helps!
regards,
brian
#4
Does this work for 6.x? How can I exclude JS files such as TinyMCE's (which has issues with aggregation) in 6.x?
#5
Please dont change the version of this issue. This patch is valid only for Drupal 5.
Your question is answered here #369871: does the D6 version not include the 'exclude' ability / feature?