Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40995

rework minify integration

XMLWordPrintable

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • w32_MDL-40995_m26_minifyreworked
    • Hide

      1/ run phpunit tests
      2/ enable js cache and disable theme creator mode
      3/ purge caches and verify the js and css served to browser (it should be minified the same way as before)
      4/ delete $CFG->dataroot/localcache and reload page, verify the JS and CSS cache files get recreated properly
      5/ test TinyMCE works
      6/ verify the YUI_config module stuff embedded in pages is minified

      Show
      1/ run phpunit tests 2/ enable js cache and disable theme creator mode 3/ purge caches and verify the js and css served to browser (it should be minified the same way as before) 4/ delete $CFG->dataroot/localcache and reload page, verify the JS and CSS cache files get recreated properly 5/ test TinyMCE works 6/ verify the YUI_config module stuff embedded in pages is minified

      There are some new problems when minifying CSS and JS:
      1/ js minify is now used from outputrequirementslib file for compression of YUI module info
      2/ the latest minify uses autoloader - it would slow down the rest of moodle
      3/ the unsetting of SERVER variable is a nasty hack that might potentially break some caching
      4/ minify is intended for direct CSS/JS file serving, but we need only the compression of files
      5/ in csslib we first minify and then replace our placeholders, this is wrong; minify works with files only but we do not want to create any temporary files there

      Proposed solution:

      • create new core_minify class
      • with methods ::css(), ::css_files(), ::js(), js_files()
      • use only as little as possible from minify
      • replace minify loader or unregister it after use

      Nota that this does not affect stable branches much, no need to backport.

            skodak Petr Skoda
            skodak Petr Skoda
            Andrew Lyons Andrew Lyons
            Sam Hemelryk Sam Hemelryk
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.