quantumcore.resources

A resource manager for CSS and JS
Download

quantumcore.resources Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Publisher Name:
  • Christian Scholz
  • Publisher web site:
  • http://comlounge.net

quantumcore.resources Tags


quantumcore.resources Description

A resource manager for CSS and JS quantumcore.resources is a resource manager for CSS and JS.Instantiating resourcesA resource corresponds to one file on the filesystem. Here we use a shortcut called js_from_pkg_stream and css_from_pkg_stream to load a file from a package.Mandatory common parameters for those functions are: * The __name__ is being used for identifying the filename inside a package. * The path is the path inside the package the __name__ belongs to.Optional arguments are: * merge defines if the resource is allowed to be merged with other similar resources. Default is True. * With prio you can define the order of the resources inside a resource manager. Resources with lower numbers are loaded first. Default is 1. * name is an optional name under which resources can be clustered together. Resources with the same name can be retrieved together then. It defaults to "". In the example the first two CSS resources will be retrieved together because they both have the same empty name. * processors define an optional list of processor functions which take the resource contents as input and output another (e.g. compressed) version. * auto_reload defines whether the resource can be reloaded or not. Note that this must be set in the Resource and the Resource Manager. Requirements: · Python


quantumcore.resources Related Software