Switch to JSMin+

Rob Loach - May 12, 2009 - 14:35
Project:Javascript Aggregator
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

http://crisp.tweakblogs.net/blog/1665/a-new-javascript-minifier-jsmin+.html

#1

derjochenmeyer - May 13, 2009 - 05:59

Looks good, but what about this?

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

#2

Rob Loach - May 13, 2009 - 11:11

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

#3

derjochenmeyer - May 21, 2009 - 00:35

@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

AttachmentSize
jsminplus.patch 1.73 KB

#4

derjochenmeyer - May 21, 2009 - 00:35
Status:active» needs review

#5

derjochenmeyer - May 23, 2009 - 14:28

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
AttachmentSize
jsminplus_2009-05-23.patch 1.71 KB

#6

Rob Loach - May 23, 2009 - 14:56

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

#7

derjochenmeyer - May 23, 2009 - 15:02

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

#8

derjochenmeyer - May 23, 2009 - 15:01

forgot the file... :)

AttachmentSize
jsminplus_2009-05-23_2.patch 1.95 KB

#9

morningtime - June 1, 2009 - 11:16

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

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

#10

Wim Leers - June 1, 2009 - 23:26

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.

#11

derjochenmeyer - July 22, 2009 - 21:47
Status:needs review» fixed

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

New version 6.x-1.3 released.

#12

derjochenmeyer - July 22, 2009 - 22:10
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.