Utilities and constants for configuring Pipeline.
This is safe to import from a project’s
side effects (for instance, it will not load any Django models or apps).
New in version 2.1.
- DEFAULT_PIPELINE_COMPILERS = ['djblets.pipeline.compilers.es6.ES6Compiler', 'djblets.pipeline.compilers.less.LessCompiler']¶
Default list of compilers used by Djblets.
Build a standard set of Pipeline settings.
This can be used to create a
PIPELINEsettings dictionary in a
settings.pyfile based on the standard Djblets Pipeline settings, which makes use of Babel, LessCSS, and UglifyJS, along with a preset list of plugins.
The following base set of Babel plugins are used:
The following LessCSS plugin is used:
This will also set the value of
Whether Pipelining of static media should be enabled.
This must be provided by a caller. It’s recommended to enable this if
False(or, better, use another variable indicating a production vs. development environment).
unicode) – The path to the loal
node_modulesdirectory for the project.
unicode) – The value of the
settings.STATIC_ROOT. This must be provided explicitly, since
settings.pyis likely the module calling this.
bool, optional) –
Whether to validate any expected paths to binary files.
It’s recommended to set this based on
DEBUG, or another variable indicating a production vs. development environment.
DJBLETS_SKIP_PIPELINE_VALIDATIONenvironment variable is set to
1, then this will be forced to
False. This is primarily used for packaging building.