private void handleCompressedResources ( final FacesContext context , final boolean provideJQuery , final boolean provideBootstrap , final List < UIComponent > resources , final UIViewRoot view ) { removeAllResourcesFromViewRoot ( context , resources , view ) ; if ( provideBootstrap && provideJQuery ) { this . addGeneratedCSSResource ( context , "dist-butterfaces-bootstrap.min.css" , view ) ; this . addGeneratedJSResource ( context , "butterfaces-all-with-jquery-and-bootstrap-bundle.min.js" , "butterfaces-dist-bundle-js" , view ) ; } else if ( provideBootstrap ) { this . addGeneratedCSSResource ( context , "dist-butterfaces-bootstrap.min.css" , view ) ; this . addGeneratedJSResource ( context , "butterfaces-all-with-bootstrap-bundle.min.js" , "butterfaces-dist-bundle-js" , view ) ; } else if ( provideJQuery ) { this . addGeneratedCSSResource ( context , "dist-butterfaces-only.min.css" , view ) ; this . addGeneratedJSResource ( context , "butterfaces-all-with-jquery-bundle.min.js" , "butterfaces-dist-bundle-js" , view ) ; } else { this . addGeneratedCSSResource ( context , "dist-butterfaces-only.min.css" , view ) ; this . addGeneratedJSResource ( context , "butterfaces-all-bundle.min.js" , "butterfaces-dist-bundle-js" , view ) ; } // butterfaces first, and then libraries from the project to override css and js for ( UIComponent resource : resources ) { context . getViewRoot ( ) . addComponentResource ( context , resource , HEAD ) ; } }
Use compressed resources .