Discussion in 'XenForo Development Discussions' started by Liam W, May 17, 2014.
How do I minify my addons js?
Is there an online service?
Indeed. @digitalpoint's service is very useful for one time or manual minification.
It uses this Google API:
I have built this into my dev tools (which includes a new version of add on builder) so that JS is minified automatically.
Yeah... being able to do that (simply) was one of the reasons I finally switched to PhpStorm instead of Zend Studio. You can do it with ZS too, but it's so much more complicated and annoying.
I use PHP Storm too but ironically my dev tools are a XF add on so my tools use their REST API to minify on the fly as the add on is exported and it's files are packaged up.
My add ons (starting with XMG 2.1) are all going to contain the full and minified versions. The full runs with debug mode on. The min versions run in normal operation. That's all controlled by a custom template helper and also generates a separate cache buster to the default XF one based on the add on version ID and the XF JS version debug option value.
Was this any help Liam?
Separate names with a comma.