1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to minify my addons js?

Discussion in 'XenForo Development Discussions' started by Liam W, May 17, 2014.

  1. Liam W

    Liam W Well-Known Member

    How do I minify my addons js?

    Is there an online service?
     
  2. Dinh Thanh

    Dinh Thanh Well-Known Member

  3. Chris D

    Chris D XenForo Developer Staff Member

    Liam W likes this.
  4. digitalpoint

    digitalpoint Well-Known Member

    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. :)
     
    Earl and Liam W like this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Liam W likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Was this any help Liam?
     
    Liam W likes this.
  7. Liam W

    Liam W Well-Known Member

    Yes, thanks :)
     

Share This Page