HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Consolidate 0.2.1b

Combine resources (js, css) according to regex patterns, to have the ideal number of requests, and minimise bloat.

Tested on

2.3

Parts based on by Minify (https://github.com/66Ton99/Vanilla/tree/master/plugins/Minify) , it will minify CSS but not JS, as that is too unreliable, especially obfuscation (and besides many libraries are pre-minified).

It will combine JS and CSS files according RegExp rules, so there is not too few (meaning that it won't all fail, becuase one thing has), but a handful, as to reduce bloat when adding countless Addons.

Repo

https://github.com/x00/Consolidate-Vanilla-Plugin

report issues here

Instructions

If you are upgrading to 0.2.1 replace the whole folder rather then copying files. The folder should not include class.headmodule.php

It will attempt to create a Consolidate folder in cache/. Please check it is present, if not create it, ensure it has write permission especially for the server user (often www-data).

You can choose your own PCRE Patterns (order is paramount), however unless you absolutely know what you are doing best stick with the default settings.

Defer JS to foot

Warning! The option to defer the JavasScript can easily break functionality. Use at your own risk. It will attempt to take declared JavaScript files and any inline JavaScript in the head, it can detect, and move it to the bottom. However there is no guarantee this will work as JavaScript can be added anywhere and in a magnitude of different ways, and these may depend on things that are meant to come before.

Questions