reviewboard.extensions.packaging¶
- class BuildStaticFiles(dist, **kw)[source]¶
Bases:
BuildStaticFiles
- get_lessc_global_vars()[source]¶
Returns a dictionary of LessCSS global variables and their values.
This can be implemented by subclasses to provide global variables for .less files for processing.
By default, this defines two variables:
STATIC_ROOT
andDEBUG
.STATIC_ROOT
is set to/static/
. Any imports using@{STATIC_ROOT}
will effectively look up the requested file in<import_path>/@{STATIC_ROOT}
. This assumes that the project serving the static files keeps them instatic/appname/
.Projects using less.js for the runtime can then define
STATIC_ROOT
tosettings.STATIC_URL
, ensuring lookups work for development and packaged extensions.DEBUG
is set to false. Runtimes using less.js can set this tosettings.DEBUG
for templates. This can be useful for LessCSS guards.This requires LessCSS 1.5.1 or higher.