Comments

derjochenmeyer’s picture

Looks good, but what about this?

Note that we don't recommend using this tool for on-the-fly minification!

robloach’s picture

JavaScript Aggregator caches the compressed files once they are processed so this shouldn't be a problem.

derjochenmeyer’s picture

StatusFileSize
new1.73 KB

@Rob Loach: Can we just add jsminplus.php to javascript_aggregator? Licence should be no problem?

Attached is a patch that introduces this idea by creating an option "Use JSMin+ instead of JSMin".

  1. copy jsminplus.php to the javascript_aggregator dir (download from http://files.tweakers.net/jsminplus/jsminplus.zip)
  2. apply patch to current 6.x-1.x-dev

JS size with JSMin: 24 KB
JS size with JSMin+: 22 KB

derjochenmeyer’s picture

Status: Active » Needs review
derjochenmeyer’s picture

StatusFileSize
new1.71 KB

rerolling for current dev version.

  1. download and copy jsminplus.php to the javascript_aggregator dir (download from http://files.tweakers.net/jsminplus/jsminplus.zip)
  2. apply patch to current 6.x-1.x-dev
robloach’s picture

Instead of adding it as an option, what are your thoughts on fully switching to it instead?

derjochenmeyer’s picture

Sure, i introduced an option only because I wanted a quick way to swtich between the scripts on various test-sties.

Do you see any disadvantage in using an option for both? Maybe in some environments JSMin works while JSMin+ produces errors?

rerolling again for current dev version after (http://drupal.org/cvs?commit=215432).

1. download and copy jsminplus.php to the javascript_aggregator dir (download from http://files.tweakers.net/jsminplus/jsminplus.zip)
2. apply patch to current 6.x-1.x-dev

derjochenmeyer’s picture

StatusFileSize
new1.95 KB

forgot the file... :)

Anonymous’s picture

I get an error message when using this patch with 6x1xdev:

"Parse error: Illegal token in file '[inline]' on line 985"

wim leers’s picture

Report it to the developer. He's very eager to get his hands on files that can trigger problems. Also note that a newer version of JSMIN+ has been released.

derjochenmeyer’s picture

Status: Needs review » Fixed

committed: http://drupal.org/cvs?commit=241454

New version 6.x-1.3 released.

derjochenmeyer’s picture

Status: Fixed » Closed (fixed)
ClearXS’s picture

Status: Closed (fixed) » Needs work

there are several errors connected to this new feature; just search on "Parse error: Illegal token in file '[inline]' on line" ...

I'm not sure which module caused it together with activating JSMin+ (latest release in latest dev module) as I have many modules activated.

Others say EazyEdit (&FileField?) but I hadn't installed that module. Error disappeared on bringing JSMin+ back to JSMin

derjochenmeyer’s picture

Status: Needs work » Closed (fixed)

Please discuss if we should drop JSMin+ here: #940342: Javascript Aggregator: Allowed memory size ... exhausted