Skip to content

collective/collective.assets

 
 

Repository files navigation

collective.assets - Webassets for Plone

image

Why webassets?

Webassets are a standardized way of proving web resources. They can be easily dispatched through commen webservers and support minification, filter-plugins (like LESS, CoffeeScript, etc.) and YAML based configuration. Collective.assets provides the glue betweeen the webassets-library and plone.resource. Plone.resource was choosen (instead of just dumping the resources to the filesystem) because then it is possible to access the files via ZServer too, which is handy for development where don't have an external webserver running.

Usage

To use collective.assets add it to the buildout. It is important that additional to the inclusion of the egg you need to specify a global resources directory: :

[instance]
recipe = plone.recipe.zope2instance
resources = ${buildout:directory}/resources
eggs += collective.assets

After running the buildout activate the package as an addon in the Plone control panel. This will give you another entry in the control panel: Assets Settings There you can activate the use of the webassets, change configuration and get an overview of the asset. You will also find a button there to generate the assets.

What versions are supported?

Collective.assets depend on plone.resource and should work with any recent Plone 4. It was developed and tested with Plone 4.2 and 4.3. For the assets version 0.8 of the webassets-library was used.

Known issues

  • Currently only one Plone per ZODB is supported
  • The sarissa.js version shipped with Plone can not be minified with jsmin. One workaround is to disable sarissa.js in portal_javascript another is to change the compression-level from safe to none.
  • The product does not support all features of the resource registry (some of them out of intention eg. inline resources, conditial comments)

Releases

No releases published

Packages

No packages published

Languages

  • Python 39.2%
  • JavaScript 37.7%
  • CSS 23.1%