Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18431

Use other js/css packer in ezjscore

    XMLWordPrintable

Details

    Description

      Actually, ezjscore can use JSMin::minify (when Packer=3 is used), but several other packers for JS exist (the most famous are yahoo compressor, dojo shrinksafe), and even for CSS

      => It would be nice to indicate which packer to use for css or/and for js, when Packer=3

      Why not something in ezjscore.ini, like (and let the user choose the packer engine he/she wants)
      [eZJSCore]
      #JavascriptPackerEngine=jsmin
      JavascriptPackerEngine=yui-compressor
      #JavascriptPackerEngine=dojo-shrinksafe

      #StylesheetPackerEngine=ez-default (the default packer that exists in ezjscPacker::optimizeCSS())
      StylesheetPackerEngine=yui-compressor
      #StylesheetPackerEngine=dojo-shrinksafe

      Here is the way to use YUI compressor:
      http://developer.yahoo.com/yui/compressor/#using
      A php class that wraps the call of yui compressor, for inspiration for eZJScore:
      http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/YUICompressor.php

      Dojo shrinksafe:
      http://shrinksafe.dojotoolkit.org/

      And as shrinksafe is also a .jar, just like yui compressor, the same link above (YUICompressor.php) could be, with slight modifications, a wrapper for using shrinksafe from php static function ezjscPacker::optimizeScript()

      Attachments

        Activity

          People

            andre1 andre1
            enzo enzo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: