[PATCH PoC] Use webassets and lesscpy to precompile LESS into CSS and (optionally) minify JavaScript

Andrew Shadura andrew at shadura.me
Mon Apr 27 08:39:20 EDT 2015


On Mon, 27 Apr 2015 13:33:04 +0200
Mads Kiilerich <mads at kiilerich.com> wrote:

> It would be nice to get some introduction to what that means and why
> we would do it - perhaps also some assessment of the pros and cons.

Well, probably.

The idea is that some of the "static" resources we serve might not be
very well editable as they're served, so we might want to precompile
them. An example would be minifying JavaScript or assembling a CSS out
of smaller CSS files or by using a macrolanguage like LESS. And using
LESS will help us manage the CSS which is already quite large;
meanwhile, Bootstrap also uses LESS, so if/when we start using it too,
we may use classes Bootstrap provides more easily.

WebAssets is a framework-agnostic module helping to arrange this sort
of precompilation.

This patch isn't directly usable as is, as I have hard-coded the
resources, and I'd probably put them into a YAML file in the root
directory instead in the final version. However, I decided to post it
here so we can start discussing things :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20150427/6ea9e1cd/attachment.sig>

More information about the kallithea-general mailing list