Continuing the discussion from List of tested and production-ready plone.app.mosaic tiles for Plone 5.1?:
sc.recipe.staticresources 1.0a1 was just released including some of the ideas @rodfersou has worked over the last months on how to deal with static resources using modern technologies in Plone 4.3 (and maybe Plone 5) on a sane, non-disruptive way.
sc.recipe.staticresources is a buildout recipe to integrate Webpack into Plone.
In recent years many tools were created to manage static resource files; these tools can:
* automatically compress images
* use CSS pre-processors and post-processors to write less and better code, taking advantage of new standards still not available to all browsers
* use JavaScript transpiler to write ES6 code and generate ES5 equivalent code, that work on all browsers
* minify resulting code
* and many other options, practically everything related to process static resources can be achieved by an official or community package
This package is aim to facilitates the integration of Webpack with Plone, writing less lines into your buildout configuration and provide a nice template to start with.
We choose Webpack because it is proven to be the best toolchain available, and many people in the Plone Community is using it.
the resulting optimized static files are registered into Plone 4.3 the usual way.
- https://pypi.python.org/pypi/sc.recipe.staticresources/1.0a1
- https://github.com/simplesconsultoria/sc.recipe.staticresources
if you want to take a look on how this work on real life, see this PR: