• 
      

    Compress/combine our CSS and JavaScript files.

    Review Request #2656 — Created Oct. 12, 2011 and submitted — Latest diff uploaded

    Information

    Review Board

    Reviewers

    Compress/combine our CSS and JavaScript files.
    
    For too long, we've had many verbose CSS and JavaScript files on production
    systems, which affected load time. We didn't have a good system in place
    for minifying/combining files.
    
    Now we use django-compress, which is a pretty awesome little module that
    allows you to easily define packages of CSS/JavaScript files. When DEBUG
    is on, the original files will be used in the templates, but when off,
    the minified versions will be used.
    
    django-compress will generally try to minify on demand if it doesn't
    find the files, but we make sure to build these files as part of the
    packaging operations. This ensures that our users will have the proper
    minified versions.
    
    The next step will be to add a new CSS filter class that processes
    lessCSS files. I'll be adding this to Djblets as a utility filter for
    django-compress, and then begin porting to less.
    Tested each affected page in both compressed mode and debug mode. Everything
    looked and acted correctly from what I can tell. This could stand some dog-fooding,
    though, and some scripts (diffviewer.js, for example) always assumed it was in its
    proper page before.