Commit 5aa01730 by James Keys Committed by Timothée Peignier

Move pipeline settings into a dictionary

parent dd98239f
......@@ -11,13 +11,13 @@ Coffee Script compiler
The Coffee Script compiler uses `Coffee Script <http://jashkenas.github.com/coffeescript/>`_
to compile your javascript.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.coffee.CoffeeScriptCompiler',
)
``PIPELINE_COFFEE_SCRIPT_BINARY``
``COFFEE_SCRIPT_BINARY``
---------------------------------
Command line to execute for coffee program.
......@@ -25,7 +25,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env coffee'``.
``PIPELINE_COFFEE_SCRIPT_ARGUMENTS``
``COFFEE_SCRIPT_ARGUMENTS``
------------------------------------
Additional arguments to use when coffee is called.
......@@ -38,13 +38,13 @@ Live Script compiler
The LiveScript compiler uses `LiveScript <https://github.com/gkz/LiveScript>`_
to compile your javascript.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.livescript.LiveScriptCompiler',
)
``PIPELINE_LIVE_SCRIPT_BINARY``
``LIVE_SCRIPT_BINARY``
---------------------------------
Command line to execute for LiveScript program.
......@@ -52,7 +52,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env lsc'``.
``PIPELINE_LIVE_SCRIPT_ARGUMENTS``
``LIVE_SCRIPT_ARGUMENTS``
------------------------------------
Additional arguments to use when lsc is called.
......@@ -65,13 +65,13 @@ LESS compiler
The LESS compiler uses `LESS <http://lesscss.org/>`_
to compile your stylesheets.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.less.LessCompiler',
)
``PIPELINE_LESS_BINARY``
``LESS_BINARY``
------------------------
Command line to execute for lessc program.
......@@ -79,7 +79,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env lessc'``.
``PIPELINE_LESS_ARGUMENTS``
``LESS_ARGUMENTS``
---------------------------
Additional arguments to use when lessc is called.
......@@ -92,14 +92,14 @@ SASS compiler
The SASS compiler uses `SASS <http://sass-lang.com/>`_
to compile your stylesheets.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.sass.SASSCompiler',
)
``PIPELINE_SASS_BINARY``
``SASS_BINARY``
------------------------
Command line to execute for sass program.
......@@ -107,7 +107,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env sass'``.
``PIPELINE_SASS_ARGUMENTS``
``SASS_ARGUMENTS``
---------------------------
Additional arguments to use when sass is called.
......@@ -121,14 +121,14 @@ Stylus compiler
The Stylus compiler uses `Stylus <http://learnboost.github.com/stylus/>`_
to compile your stylesheets.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.stylus.StylusCompiler',
)
``PIPELINE_STYLUS_BINARY``
``STYLUS_BINARY``
--------------------------
Command line to execute for stylus program.
......@@ -136,7 +136,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env stylus'``.
``PIPELINE_STYLUS_ARGUMENTS``
``STYLUS_ARGUMENTS``
-----------------------------
Additional arguments to use when stylus is called.
......@@ -150,14 +150,14 @@ ES6 compiler
The ES6 compiler uses `Babel <https://babeljs.io>`_
to convert ES6+ code into vanilla ES5.
To use it add this to your ``PIPELINE_COMPILERS`` ::
To use it add this to your ``PIPELINE['COMPILERS']`` ::
PIPELINE_COMPILERS = (
PIPELINE['COMPILERS'] = (
'pipeline.compilers.es6.ES6Compiler',
)
``PIPELINE_BABEL_BINARY``
``BABEL_BINARY``
--------------------------
Command line to execute for babel program.
......@@ -165,7 +165,7 @@ To use it add this to your ``PIPELINE_COMPILERS`` ::
Defaults to ``'/usr/bin/env babel'``.
``PIPELINE_BABEL_ARGUMENTS``
``BABEL_ARGUMENTS``
-----------------------------
Additional arguments to use when babel is called.
......@@ -182,7 +182,7 @@ of compilers.
To do so, you just have to create a class that inherits from ``pipeline.compilers.CompilerBase``
and implements ``match_file`` and ``compile_file`` when needed.
Finally, specify it in the tuple of compilers ``PIPELINE_COMPILERS`` in the settings.
Finally, specify it in the tuple of compilers ``PIPELINE['COMPILERS']`` in the settings.
Example
-------
......
......@@ -11,13 +11,13 @@ Yuglify compressor
The Yuglify compressor uses `yuglify <http://github.com/yui/yuglify>`_
for compressing javascript and stylesheets.
To use it for your stylesheets add this to your ``PIPELINE_CSS_COMPRESSOR`` ::
To use it for your stylesheets add this to your ``PIPELINE['CSS_COMPRESSOR']`` ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.yuglify.YuglifyCompressor'
To use it for your javascripts add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it for your javascripts add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.yuglify.YuglifyCompressor'
``PIPELINE_YUGLIFY_BINARY``
......@@ -49,13 +49,13 @@ YUI Compressor compressor
The YUI compressor uses `yui-compressor <http://developer.yahoo.com/yui/compressor/>`_
for compressing javascript and stylesheets.
To use it for your stylesheets add this to your ``PIPELINE_CSS_COMPRESSOR`` ::
To use it for your stylesheets add this to your ``PIPELINE['CSS_COMPRESSOR']`` ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'
To use it for your javascripts add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it for your javascripts add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yui.YUICompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'
``PIPELINE_YUI_BINARY``
......@@ -91,9 +91,9 @@ Closure Compiler compressor
The Closure compressor uses `Google Closure Compiler <http://code.google.com/closure/compiler/>`_
to compress javascripts.
To use it add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.closure.ClosureCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.closure.ClosureCompressor'
``PIPELINE_CLOSURE_BINARY``
......@@ -122,9 +122,9 @@ UglifyJS compressor
The UglifyJS compressor uses `UglifyJS <https://github.com/mishoo/UglifyJS2/>`_ to
compress javascripts.
To use it add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
``PIPELINE_UGLIFYJS_BINARY``
......@@ -149,9 +149,9 @@ JSMin compressor
The jsmin compressor uses Douglas Crockford jsmin tool to
compress javascripts.
To use it add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.jsmin.JSMinCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.jsmin.JSMinCompressor'
Install the jsmin library with your favorite Python package manager ::
......@@ -164,9 +164,9 @@ SlimIt compressor
The slimit compressor uses `SlimIt <http://slimit.org/>`_ to
compress javascripts.
To use it add this to your ``PIPELINE_JS_COMPRESSOR`` ::
To use it add this to your ``PIPELINE['JS_COMPRESSOR']`` ::
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.slimit.SlimItCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.slimit.SlimItCompressor'
Install the slimit library with your favorite Python package manager ::
......@@ -179,9 +179,9 @@ CSSTidy compressor
The CSStidy compressor uses `CSStidy <http://csstidy.sourceforge.net/>`_ to compress
stylesheets.
To us it for your stylesheets add this to your ``PIPELINE_CSS_COMPRESSOR`` ::
To us it for your stylesheets add this to your ``PIPELINE['CSS_COMPRESSOR']`` ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.csstidy.CSSTidyCompressor'
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.csstidy.CSSTidyCompressor'
``PIPELINE_CSSTIDY_BINARY``
---------------------------
......@@ -202,9 +202,9 @@ CSSMin compressor
=================
The cssmin compressor uses the `cssmin <https://github.com/jbleuzen/node-cssmin>`_
command to compress stylesheets. To use it, add this to your ``PIPELINE_CSS_COMPRESSOR`` ::
command to compress stylesheets. To use it, add this to your ``PIPELINE['CSS_COMPRESSOR']`` ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.cssmin.CSSMinCompressor'
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.cssmin.CSSMinCompressor'
``PIPELINE_CSSMIN_BINARY``
---------------------------
......@@ -229,8 +229,8 @@ This is useful for debugging faulty concatenation due to poorly written javascri
To use it, add this to your settings ::
PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.NoopCompressor'
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.NoopCompressor'
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.NoopCompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.NoopCompressor'
Write your own compressor class
......@@ -242,8 +242,8 @@ of compressors.
To do so, you just have to create a class that inherits from ``pipeline.compressors.CompressorBase``
and implements ``compress_css`` and/or a ``compress_js`` when needed.
Finally, add it to ``PIPELINE_CSS_COMPRESSOR`` or
``PIPELINE_JS_COMPRESSOR`` settings (see :doc:`configuration` for more information).
Finally, add it to ``PIPELINE['CSS_COMPRESSOR']`` or
``PIPELINE['JS_COMPRESSOR']`` settings (see :doc:`configuration` for more information).
Example
-------
......@@ -262,5 +262,6 @@ A custom compressor for an imaginary compressor called jam ::
Add it to your settings ::
PIPELINE_CSS_COMPRESSOR = 'jam.compressors.JamCompressor'
PIPELINE_JS_COMPRESSOR = 'jam.compressors.JamCompressor'
PIPELINE['CSS_COMPRESSOR'] = 'jam.compressors.JamCompressor'
PIPELINE['JS_COMPRESSOR'] = 'jam.compressors.JamCompressor'
......@@ -5,7 +5,22 @@ Configuration
=============
Configuration and list of available settings for Pipeline
Configuration and list of available settings for Pipeline. Pipeline settings are namespaced in a PIPELINE dictionary in your project settings, e.g.:
PIPELINE = {
'PIPELINE_ENABLED': True,
'JAVASCRIPT': {
'stats': {
'source_filenames': (
'js/jquery.js',
'js/d3.js',
'js/collections/*.js',
'js/application.js',
),
'output_filename': 'js/stats.js',
}
}
}
Specifying files
......@@ -16,29 +31,32 @@ syntax to select multiples files.
The basic syntax for specifying CSS/JavaScript groups files is ::
PIPELINE_CSS = {
'colors': {
'source_filenames': (
'css/core.css',
'css/colors/*.css',
'css/layers.css'
),
'output_filename': 'css/colors.css',
'extra_context': {
'media': 'screen,projection',
PIPELINE = {
'STYLESHEETS': {
'colors': {
'source_filenames': (
'css/core.css',
'css/colors/*.css',
'css/layers.css'
),
'output_filename': 'css/colors.css',
'extra_context': {
'media': 'screen,projection',
},
},
},
}
PIPELINE_JS = {
'stats': {
'source_filenames': (
'js/jquery.js',
'js/d3.js',
'js/collections/*.js',
'js/application.js',
),
'output_filename': 'js/stats.js',
'JAVASCRIPT': {
'stats': {
'source_filenames': (
'js/jquery.js',
'js/d3.js',
'js/collections/*.js',
'js/application.js',
),
'output_filename': 'js/stats.js',
}
}
}
......@@ -118,7 +136,7 @@ Other settings
Defaults to ``not settings.DEBUG``.
``PIPELINE_CSS_COMPRESSOR``
``CSS_COMPRESSOR``
............................
Compressor class to be applied to CSS files.
......@@ -127,7 +145,7 @@ Other settings
Defaults to ``'pipeline.compressors.yuglify.YuglifyCompressor'``.
``PIPELINE_JS_COMPRESSOR``
JS_COMPRESSOR``
...........................
Compressor class to be applied to JavaScript files.
......@@ -140,7 +158,7 @@ Other settings
Please note that in order to use Yuglify compressor, you need to install Yuglify (see :doc:`installation` for more details).
``PIPELINE_TEMPLATE_NAMESPACE``
TEMPLATE_NAMESPACE``
...............................
Object name where all of your compiled templates will be added, from within your browser.
......@@ -149,7 +167,7 @@ Other settings
Defaults to ``"window.JST"``
``PIPELINE_TEMPLATE_EXT``
TEMPLATE_EXT``
.........................
The extension for which Pipeline will consider the file as a Javascript template.
......@@ -157,7 +175,7 @@ Other settings
Defaults to ``".jst"``
``PIPELINE_TEMPLATE_FUNC``
TEMPLATE_FUNC``
..........................
JavaScript function that compiles your JavaScript templates.
......@@ -167,7 +185,7 @@ Other settings
Defaults to ``"_.template"``
``PIPELINE_TEMPLATE_SEPARATOR``
TEMPLATE_SEPARATOR``
...............................
Character chain used by Pipeline as replacement for directory separator.
......@@ -175,7 +193,7 @@ Other settings
Defaults to ``"_"``
``PIPELINE_MIMETYPES``
MIMETYPES``
......................
Tuple that match file extension with their corresponding mimetypes.
......@@ -203,7 +221,7 @@ modern browsers.
To do so, setup variant group options to the method you wish to use : ::
PIPELINE_CSS = {
'STYLESHEETS' = {
'master': {
'source_filenames': (
'css/core.css',
......@@ -225,7 +243,7 @@ Overriding embedding settings
You can override these rules using the following settings:
``PIPELINE_EMBED_MAX_IMAGE_SIZE``
EMBED_MAX_IMAGE_SIZE``
.................................
Setting that controls the maximum image size (in bytes) to embed in CSS using Data-URIs.
......@@ -233,7 +251,7 @@ You can override these rules using the following settings:
Defaults to ``32700``
``PIPELINE_EMBED_PATH``
EMBED_PATH``
.......................
Setting the directory that an asset needs to be in so that it is embedded
......@@ -259,4 +277,4 @@ All javascript output is wrapped in an anonymous function : ::
This safety wrapper, make it difficult to pollute the global namespace by accident and improve performance.
You can override this behavior by setting ``PIPELINE_DISABLE_WRAPPER`` to ``True``.
You can override this behavior by setting DISABLE_WRAPPER`` to ``True``.
......@@ -111,7 +111,7 @@ Add your Bower directory to your ``STATICFILES_DIRS`` : ::
Then process the relevant content through Pipeline : ::
PIPELINE_JS = {
PIPELINE['JAVASCRIPT'] = {
'components': {
'source_filenames': (
'jquery/jquery.js',
......
......@@ -5,9 +5,9 @@ Javascript Templates
====================
Pipeline allows you to use javascript templates along with your javascript views.
To use your javascript templates, just add them to your ``PIPELINE_JS`` group ::
To use your javascript templates, just add them to your ``JAVASCRIPT`` group ::
PIPELINE_JS = {
PIPELINE['JAVASCRIPT'] = {
'application': {
'source_filenames': (
'js/application.js',
......@@ -37,34 +37,34 @@ Configuration
Template function
.................
By default, Pipeline uses a variant of `Micro Templating <http://ejohn.org/blog/javascript-micro-templating/>`_ to compile the templates, but you can choose your preferred JavaScript templating engine by changing ``PIPELINE_TEMPLATE_FUNC`` ::
By default, Pipeline uses a variant of `Micro Templating <http://ejohn.org/blog/javascript-micro-templating/>`_ to compile the templates, but you can choose your preferred JavaScript templating engine by changing ``PIPELINE['TEMPLATE_FUNC']`` ::
PIPELINE_TEMPLATE_FUNC = 'template'
PIPELINE['TEMPLATE_FUNC'] = 'template'
Template namespace
..................
Your templates are made available in a top-level object, by default ``window.JST``,
but you can choose your own via ``PIPELINE_TEMPLATE_NAMESPACE`` ::
but you can choose your own via ``PIPELINE['TEMPLATE_NAMESPACE']`` ::
PIPELINE_TEMPLATE_NAMESPACE = 'window.Template'
PIPELINE['TEMPLATE_NAMESPACE'] = 'window.Template'
Template extension
..................
Templates are detected by their extension, by default ``.jst``, but you can use
your own extension via ``PIPELINE_TEMPLATE_EXT`` ::
your own extension via ``PIPELINE['TEMPLATE_EXT']`` ::
PIPELINE_TEMPLATE_EXT = '.mustache'
PIPELINE['TEMPLATE_EXT'] = '.mustache'
Template separator
..................
Templates identifier are built using a replacement for directory separator,
by default ``_``, but you specify your own sperator via ``PIPELINE_TEMPLATE_SEPARATOR`` ::
by default ``_``, but you specify your own separator via ``PIPELINE['TEMPLATE_SEPARATOR']`` ::
PIPELINE_TEMPLATE_SEPARATOR = '/'
PIPELINE['TEMPLATE_SEPARATOR'] = '/'
Using it with your favorite template library
......@@ -88,33 +88,33 @@ some extra javascript ::
And use these settings ::
PIPELINE_TEMPLATE_EXT = '.mustache'
PIPELINE_TEMPLATE_FUNC = 'Mustache.template'
PIPELINE['TEMPLATE_EXT'] = '.mustache'
PIPELINE['TEMPLATE_FUNC'] = 'Mustache.template'
Handlebars
..........
To use it with `Handlebars <http://handlebarsjs.com/>`_, use the following settings ::
PIPELINE_TEMPLATE_EXT = '.handlebars'
PIPELINE_TEMPLATE_FUNC = 'Handlebars.compile'
PIPELINE_TEMPLATE_NAMESPACE = 'Handlebars.templates'
PIPELINE['TEMPLATE_EXT'] = '.handlebars'
PIPELINE['TEMPLATE_FUNC'] = 'Handlebars.compile'
PIPELINE['TEMPLATE_NAMESPACE'] = 'Handlebars.templates'
Ember.js + Handlebars
.....................
To use it with `Ember.js <http://emberjs.com/>`_, use the following settings ::
PIPELINE_TEMPLATE_EXT = '.handlebars'
PIPELINE_TEMPLATE_FUNC = 'Ember.Handlebars.compile'
PIPELINE_TEMPLATE_NAMESPACE = 'window.Ember.TEMPLATES'
PIPELINE_TEMPLATE_SEPARATOR = '/'
PIPELINE['TEMPLATE_EXT'] = '.handlebars'
PIPELINE['TEMPLATE_FUNC'] = 'Ember.Handlebars.compile'
PIPELINE['TEMPLATE_NAMESPACE'] = 'window.Ember.TEMPLATES'
PIPELINE['TEMPLATE_SEPARATOR'] = '/'
Prototype
.........
To use it with `Prototype <http://www.prototypejs.org/>`_, just setup your
``PIPELINE_TEMPLATE_FUNC`` ::
``PIPELINE['TEMPLATE_FUNC']`` ::
PIPELINE_TEMPLATE_FUNC = 'new Template'
PIPELINE['TEMPLATE_FUNC'] = 'new Template'
......@@ -20,7 +20,7 @@ When ``settings.DEBUG`` is set to ``True`` the use of these template tags will
result in a separate tag for each resource in a given group (i.e., the
combined, compressed files will not be used), in order to make local debugging
easy. When ``settings.DEBUG`` is set to ``False`` the opposite is true. You can
override the default behavior by setting ``settings.PIPELINE_ENABLED``
override the default behavior by setting ``settings.PIPELINE['PIPELINE_ENABLED']``
manually. When set to ``True`` or ``False`` this enables or disables,
respectively, the usage of the combined, compressed file for each resource
group. This can be useful, if you encounter errors in your compressed code that
......
......@@ -26,7 +26,7 @@ class Compiler(object):
@property
def compilers(self):
return [to_class(compiler) for compiler in settings.PIPELINE_COMPILERS]
return [to_class(compiler) for compiler in settings.COMPILERS]
def compile(self, paths, force=False):
def _compile(input_path):
......
......@@ -14,8 +14,8 @@ class CoffeeScriptCompiler(SubProcessCompiler):
if not outdated and not force:
return # File doesn't need to be recompiled
command = "%s -cp %s %s > %s" % (
settings.PIPELINE_COFFEE_SCRIPT_BINARY,
settings.PIPELINE_COFFEE_SCRIPT_ARGUMENTS,
settings.COFFEE_SCRIPT_BINARY,
settings.COFFEE_SCRIPT_ARGUMENTS,
infile,
outfile
)
......
......@@ -14,8 +14,8 @@ class ES6Compiler(SubProcessCompiler):
if not outdated and not force:
return # File doesn't need to be recompiled
command = "%s %s %s -o %s" % (
settings.PIPELINE_BABEL_BINARY,
settings.PIPELINE_BABEL_ARGUMENTS,
settings.BABEL_BINARY,
settings.BABEL_ARGUMENTS,
infile,
outfile
)
......
......@@ -15,8 +15,8 @@ class LessCompiler(SubProcessCompiler):
def compile_file(self, infile, outfile, outdated=False, force=False):
# Pipe to file rather than provide outfile arg due to a bug in lessc
command = "%s %s %s > %s" % (
settings.PIPELINE_LESS_BINARY,
settings.PIPELINE_LESS_ARGUMENTS,
settings.LESS_BINARY,
settings.LESS_ARGUMENTS,
infile,
outfile
)
......
......@@ -14,8 +14,8 @@ class LiveScriptCompiler(SubProcessCompiler):
if not outdated and not force:
return # File doesn't need to be recompiled
command = "%s -cp %s %s > %s" % (
settings.PIPELINE_LIVE_SCRIPT_BINARY,
settings.PIPELINE_LIVE_SCRIPT_ARGUMENTS,
settings.LIVE_SCRIPT_BINARY,
settings.LIVE_SCRIPT_ARGUMENTS,
infile,
outfile
)
......
......@@ -14,8 +14,8 @@ class SASSCompiler(SubProcessCompiler):
def compile_file(self, infile, outfile, outdated=False, force=False):
command = "%s %s %s %s" % (
settings.PIPELINE_SASS_BINARY,
settings.PIPELINE_SASS_ARGUMENTS,
settings.SASS_BINARY,
settings.SASS_ARGUMENTS,
infile,
outfile
)
......
......@@ -14,8 +14,8 @@ class StylusCompiler(SubProcessCompiler):
def compile_file(self, infile, outfile, outdated=False, force=False):
command = "%s %s %s" % (
settings.PIPELINE_STYLUS_BINARY,
settings.PIPELINE_STYLUS_ARGUMENTS,
settings.STYLUS_BINARY,
settings.STYLUS_ARGUMENTS,
infile
)
return self.execute_command(command, cwd=dirname(infile))
......@@ -47,11 +47,11 @@ class Compressor(object):
@property
def js_compressor(self):
return to_class(settings.PIPELINE_JS_COMPRESSOR)
return to_class(settings.JS_COMPRESSOR)
@property
def css_compressor(self):
return to_class(settings.PIPELINE_CSS_COMPRESSOR)
return to_class(settings.CSS_COMPRESSOR)
def compress_js(self, paths, templates=None, **kwargs):
"""Concatenate and compress JS files"""
......@@ -85,7 +85,7 @@ class Compressor(object):
compiled = []
if not paths:
return ''
namespace = settings.PIPELINE_TEMPLATE_NAMESPACE
namespace = settings.TEMPLATE_NAMESPACE
base_path = self.base_path(paths)
for path in paths:
contents = self.read_text(path)
......@@ -95,10 +95,10 @@ class Compressor(object):
compiled.append("%s['%s'] = %s('%s');\n" % (
namespace,
name,
settings.PIPELINE_TEMPLATE_FUNC,
settings.TEMPLATE_FUNC,
contents
))
compiler = TEMPLATE_FUNC if settings.PIPELINE_TEMPLATE_FUNC == DEFAULT_TEMPLATE_FUNC else ""
compiler = TEMPLATE_FUNC if settings.TEMPLATE_FUNC == DEFAULT_TEMPLATE_FUNC else ""
return "\n".join([
"%(namespace)s = %(namespace)s || {};" % {'namespace': namespace},
compiler,
......@@ -118,9 +118,9 @@ class Compressor(object):
if path == base:
base = os.path.dirname(path)
name = re.sub(r"^%s[\/\\]?(.*)%s$" % (
re.escape(base), re.escape(settings.PIPELINE_TEMPLATE_EXT)
re.escape(base), re.escape(settings.TEMPLATE_EXT)
), r"\1", path)
return re.sub(r"[\/\\]", settings.PIPELINE_TEMPLATE_SEPARATOR, name)
return re.sub(r"[\/\\]", settings.TEMPLATE_SEPARATOR, name)
def concatenate_and_rewrite(self, paths, output_filename, variant=None):
"""Concatenate together files and rewrite urls"""
......@@ -163,11 +163,11 @@ class Compressor(object):
font = ext in FONT_EXTS
if not variant:
return False
if not (re.search(settings.PIPELINE_EMBED_PATH, path.replace('\\', '/')) and self.storage.exists(path)):
if not (re.search(settings.EMBED_PATH, path.replace('\\', '/')) and self.storage.exists(path)):
return False
if ext not in EMBED_EXTS:
return False
if not (font or len(self.encoded_content(path)) < settings.PIPELINE_EMBED_MAX_IMAGE_SIZE):
if not (font or len(self.encoded_content(path)) < settings.EMBED_MAX_IMAGE_SIZE):
return False
return True
......
......@@ -6,5 +6,5 @@ from pipeline.compressors import SubProcessCompressor
class ClosureCompressor(SubProcessCompressor):
def compress_js(self, js):
command = '%s %s' % (settings.PIPELINE_CLOSURE_BINARY, settings.PIPELINE_CLOSURE_ARGUMENTS)
command = '%s %s' % (settings.CLOSURE_BINARY, settings.CLOSURE_ARGUMENTS)
return self.execute_command(command, js)
......@@ -6,5 +6,5 @@ from pipeline.compressors import SubProcessCompressor
class CSSMinCompressor(SubProcessCompressor):
def compress_css(self, css):
command = "%s %s" % (settings.PIPELINE_CSSMIN_BINARY, settings.PIPELINE_CSSMIN_ARGUMENTS)
command = "%s %s" % (settings.CSSMIN_BINARY, settings.CSSMIN_ARGUMENTS)
return self.execute_command(command, css)
......@@ -11,8 +11,8 @@ class CSSTidyCompressor(SubProcessCompressor):
output_file = tempfile.NamedTemporaryFile(suffix='.pipeline')
command = '%s - %s %s' % (
settings.PIPELINE_CSSTIDY_BINARY,
settings.PIPELINE_CSSTIDY_ARGUMENTS,
settings.CSSTIDY_BINARY,
settings.CSSTIDY_ARGUMENTS,
output_file.name
)
self.execute_command(command, css)
......
......@@ -6,7 +6,7 @@ from pipeline.compressors import SubProcessCompressor
class UglifyJSCompressor(SubProcessCompressor):
def compress_js(self, js):
command = '%s %s' % (settings.PIPELINE_UGLIFYJS_BINARY, settings.PIPELINE_UGLIFYJS_ARGUMENTS)
command = '%s %s' % (settings.UGLIFYJS_BINARY, settings.UGLIFYJS_ARGUMENTS)
if self.verbose:
command += ' --verbose'
return self.execute_command(command, js)
......@@ -6,11 +6,11 @@ from pipeline.compressors import SubProcessCompressor
class YuglifyCompressor(SubProcessCompressor):
def compress_common(self, content, compress_type, arguments):
command = '%s --type=%s %s' % (settings.PIPELINE_YUGLIFY_BINARY, compress_type, arguments)
command = '%s --type=%s %s' % (settings.YUGLIFY_BINARY, compress_type, arguments)
return self.execute_command(command, content)
def compress_js(self, js):
return self.compress_common(js, 'js', settings.PIPELINE_YUGLIFY_JS_ARGUMENTS)
return self.compress_common(js, 'js', settings.YUGLIFY_JS_ARGUMENTS)
def compress_css(self, css):
return self.compress_common(css, 'css', settings.PIPELINE_YUGLIFY_CSS_ARGUMENTS)
return self.compress_common(css, 'css', settings.YUGLIFY_CSS_ARGUMENTS)
......@@ -6,11 +6,11 @@ from pipeline.compressors import SubProcessCompressor
class YUICompressor(SubProcessCompressor):
def compress_common(self, content, compress_type, arguments):
command = '%s --type=%s %s' % (settings.PIPELINE_YUI_BINARY, compress_type, arguments)
command = '%s --type=%s %s' % (settings.YUI_BINARY, compress_type, arguments)
return self.execute_command(command, content)
def compress_js(self, js):
return self.compress_common(js, 'js', settings.PIPELINE_YUI_JS_ARGUMENTS)
return self.compress_common(js, 'js', settings.YUI_JS_ARGUMENTS)
def compress_css(self, css):
return self.compress_common(css, 'css', settings.PIPELINE_YUI_CSS_ARGUMENTS)
return self.compress_common(css, 'css', settings.YUI_CSS_ARGUMENTS)
......@@ -4,66 +4,64 @@ from __future__ import unicode_literals
from django.conf import settings as _settings
DEFAULTS = {
'DEBUG': False,
'PIPELINE_ENABLED': not _settings.DEBUG,
'PIPELINE_ROOT': _settings.STATIC_ROOT,
'PIPELINE_URL': _settings.STATIC_URL,
'PIPELINE_CSS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
'PIPELINE_JS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
'PIPELINE_COMPILERS': [],
'CSS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
'JS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
'COMPILERS': [],
'PIPELINE_CSS': {},
'PIPELINE_JS': {},
'STYLESHEETS': {},
'JAVASCRIPT': {},
'PIPELINE_TEMPLATE_NAMESPACE': "window.JST",
'PIPELINE_TEMPLATE_EXT': ".jst",
'PIPELINE_TEMPLATE_FUNC': "template",
'PIPELINE_TEMPLATE_SEPARATOR': "_",
'TEMPLATE_NAMESPACE': "window.JST",
'TEMPLATE_EXT': ".jst",
'TEMPLATE_FUNC': "template",
'TEMPLATE_SEPARATOR': "_",
'PIPELINE_DISABLE_WRAPPER': False,
'DISABLE_WRAPPER': False,
'PIPELINE_CSSTIDY_BINARY': '/usr/bin/env csstidy',
'PIPELINE_CSSTIDY_ARGUMENTS': '--template=highest',
'CSSTIDY_BINARY': '/usr/bin/env csstidy',
'CSSTIDY_ARGUMENTS': '--template=highest',
'PIPELINE_YUGLIFY_BINARY': '/usr/bin/env yuglify',
'PIPELINE_YUGLIFY_CSS_ARGUMENTS': '--terminal',
'PIPELINE_YUGLIFY_JS_ARGUMENTS': '--terminal',
'YUGLIFY_BINARY': '/usr/bin/env yuglify',
'YUGLIFY_CSS_ARGUMENTS': '--terminal',
'YUGLIFY_JS_ARGUMENTS': '--terminal',
'PIPELINE_YUI_BINARY': '/usr/bin/env yuicompressor',
'PIPELINE_YUI_CSS_ARGUMENTS': '',
'PIPELINE_YUI_JS_ARGUMENTS': '',
'YUI_BINARY': '/usr/bin/env yuicompressor',
'YUI_CSS_ARGUMENTS': '',
'YUI_JS_ARGUMENTS': '',
'PIPELINE_CLOSURE_BINARY': '/usr/bin/env closure',
'PIPELINE_CLOSURE_ARGUMENTS': '',
'CLOSURE_BINARY': '/usr/bin/env closure',
'CLOSURE_ARGUMENTS': '',
'PIPELINE_UGLIFYJS_BINARY': '/usr/bin/env uglifyjs',
'PIPELINE_UGLIFYJS_ARGUMENTS': '',
'UGLIFYJS_BINARY': '/usr/bin/env uglifyjs',
'UGLIFYJS_ARGUMENTS': '',
'PIPELINE_CSSMIN_BINARY': '/usr/bin/env cssmin',
'PIPELINE_CSSMIN_ARGUMENTS': '',
'CSSMIN_BINARY': '/usr/bin/env cssmin',
'CSSMIN_ARGUMENTS': '',
'PIPELINE_COFFEE_SCRIPT_BINARY': '/usr/bin/env coffee',
'PIPELINE_COFFEE_SCRIPT_ARGUMENTS': '',
'COFFEE_SCRIPT_BINARY': '/usr/bin/env coffee',
'COFFEE_SCRIPT_ARGUMENTS': '',
'PIPELINE_BABEL_BINARY': '/usr/bin/env babel',
'PIPELINE_BABEL_ARGUMENTS': '',
'BABEL_BINARY': '/usr/bin/env babel',
'BABEL_ARGUMENTS': '',
'PIPELINE_LIVE_SCRIPT_BINARY': '/usr/bin/env lsc',
'PIPELINE_LIVE_SCRIPT_ARGUMENTS': '',
'LIVE_SCRIPT_BINARY': '/usr/bin/env lsc',
'LIVE_SCRIPT_ARGUMENTS': '',
'PIPELINE_SASS_BINARY': '/usr/bin/env sass',
'PIPELINE_SASS_ARGUMENTS': '',
'SASS_BINARY': '/usr/bin/env sass',
'SASS_ARGUMENTS': '',
'PIPELINE_STYLUS_BINARY': '/usr/bin/env stylus',
'PIPELINE_STYLUS_ARGUMENTS': '',
'STYLUS_BINARY': '/usr/bin/env stylus',
'STYLUS_ARGUMENTS': '',
'PIPELINE_LESS_BINARY': '/usr/bin/env lessc',
'PIPELINE_LESS_ARGUMENTS': '',
'LESS_BINARY': '/usr/bin/env lessc',
'LESS_ARGUMENTS': '',
'PIPELINE_MIMETYPES': (
'MIMETYPES': (
(b'text/coffeescript', '.coffee'),
(b'text/less', '.less'),
(b'text/javascript', '.js'),
......@@ -71,24 +69,18 @@ DEFAULTS = {
(b'text/x-scss', '.scss')
),
'PIPELINE_EMBED_MAX_IMAGE_SIZE': 32700,
'PIPELINE_EMBED_PATH': r'[/]?embed/',
'EMBED_MAX_IMAGE_SIZE': 32700,
'EMBED_PATH': r'[/]?embed/',
}
class PipelineSettings(object):
'''
Lazy Django settings wrapper for Django Pipeline
Container object for pipeline settings
'''
def __init__(self, wrapped_settings):
self.wrapped_settings = wrapped_settings
DEFAULTS.update(wrapped_settings)
self.__dict__ = DEFAULTS
def __getattr__(self, name):
if hasattr(self.wrapped_settings, name):
return getattr(self.wrapped_settings, name)
elif name in DEFAULTS:
return DEFAULTS[name]
else:
raise AttributeError("'%s' setting not found" % name)
settings = PipelineSettings(_settings)
settings = PipelineSettings(_settings.PIPELINE)
......@@ -24,10 +24,10 @@ class PipelineFinder(BaseStorageFinder):
class ManifestFinder(BaseFinder):
def find(self, path, all=False):
"""
Looks for files in PIPELINE_CSS and PIPELINE_JS
Looks for files in PIPELINE.STYLESHEETS and PIPELINE.JAVASCRIPT
"""
matches = []
for elem in chain(settings.PIPELINE_CSS.values(), settings.PIPELINE_JS.values()):
for elem in chain(settings.STYLESHEETS.values(), settings.JAVASCRIPT.values()):
if elem['output_filename'] == path:
match = safe_join(settings.PIPELINE_ROOT, path)
if not all:
......
......@@ -2,6 +2,7 @@ from __future__ import unicode_literals
import os
from django.conf.settings import settings as django_settings
from django.contrib.staticfiles.finders import get_finders
from django.contrib.staticfiles.storage import staticfiles_storage
......@@ -32,7 +33,6 @@ class PipelineManifest(Manifest):
return packages
def cache(self):
ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None)
if settings.PIPELINE_ENABLED:
for package in self.packages:
......@@ -45,6 +45,7 @@ class PipelineManifest(Manifest):
self.package_files.append(path)
yield staticfiles_storage.url(path)
ignore_patterns = getattr(django_settings, "STATICFILES_IGNORE_PATTERNS", None)
for finder in self.finders:
for path, storage in finder.list(ignore_patterns):
# Prefix the relative path if the source storage contains it
......@@ -55,5 +56,6 @@ class PipelineManifest(Manifest):
# Dont add any doubles
if prefixed_path not in self.package_files:
self.package_files.append(prefixed_path)
yield staticfiles_storage.url(prefixed_path)
......@@ -32,12 +32,12 @@ class Package(object):
@property
def paths(self):
return [path for path in self.sources
if not path.endswith(settings.PIPELINE_TEMPLATE_EXT)]
if not path.endswith(settings.TEMPLATE_EXT)]
@property
def templates(self):
return [path for path in self.sources
if path.endswith(settings.PIPELINE_TEMPLATE_EXT)]
if path.endswith(settings.TEMPLATE_EXT)]
@property
def output_filename(self):
......@@ -69,9 +69,9 @@ class Packager(object):
self.compressor = Compressor(storage=storage, verbose=verbose)
self.compiler = Compiler(storage=storage, verbose=verbose)
if css_packages is None:
css_packages = settings.PIPELINE_CSS
css_packages = settings.STYLESHEETS
if js_packages is None:
js_packages = settings.PIPELINE_JS
js_packages = settings.JAVASCRIPT
self.packages = {
'css': self.create_packages(css_packages),
'js': self.create_packages(js_packages),
......
......@@ -31,8 +31,8 @@ class PipelineMixin(object):
def package_for(self, package_name, package_type):
package = {
'js': getattr(settings, 'PIPELINE_JS', {}).get(package_name, {}),
'css': getattr(settings, 'PIPELINE_CSS', {}).get(package_name, {}),
'js': getattr(settings, 'JAVASCRIPT', {}).get(package_name, {}),
'css': getattr(settings, 'STYLESHEETS', {}).get(package_name, {}),
}[package_type]
if package:
......@@ -137,7 +137,7 @@ def stylesheet(parser, token):
try:
tag_name, name = token.split_contents()
except ValueError:
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE_CSS setting' % token.split_contents()[0])
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE.STYLESHEETS setting' % token.split_contents()[0])
return StylesheetNode(name)
......@@ -146,5 +146,5 @@ def javascript(parser, token):
try:
tag_name, name = token.split_contents()
except ValueError:
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE_JS setting' % token.split_contents()[0])
raise template.TemplateSyntaxError('%r requires exactly one argument: the name of a group in the PIPELINE.JAVASVRIPT setting' % token.split_contents()[0])
return JavascriptNode(name)
......@@ -31,7 +31,7 @@ def filepath_to_uri(path):
def guess_type(path, default=None):
for type, ext in settings.PIPELINE_MIMETYPES:
for type, ext in settings.MIMETYPES:
mimetypes.add_type(type, ext)
mimetype, _ = mimetypes.guess_type(path)
if not mimetype:
......
......@@ -60,61 +60,63 @@ TEMPLATE_DIRS = (
local_path('templates'),
)
PIPELINE_CSS = {
'screen': {
'source_filenames': (
'pipeline/css/first.css',
'pipeline/css/second.css',
'pipeline/css/urls.css'
),
'output_filename': 'screen.css'
}
}
PIPELINE_JS = {
'scripts': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts.js'
},
'scripts_async': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_async.js',
'extra_context': {
'async': True,
}
},
'scripts_defer': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_defer.js',
'extra_context': {
'defer': True,
PIPELINE = {
'STYLESHEETS': {
'screen': {
'source_filenames': (
'pipeline/css/first.css',
'pipeline/css/second.css',
'pipeline/css/urls.css'
),
'output_filename': 'screen.css'
}
},
'scripts_async_defer': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_async_defer.js',
'extra_context': {
'async': True,
'defer': True,
'JAVASCRIPT': {
'scripts': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts.js'
},
'scripts_async': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_async.js',
'extra_context': {
'async': True,
}
},
'scripts_defer': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_defer.js',
'extra_context': {
'defer': True,
}
},
'scripts_async_defer': {
'source_filenames': (
'pipeline/js/first.js',
'pipeline/js/second.js',
'pipeline/js/application.js',
'pipeline/templates/**/*.jst'
),
'output_filename': 'scripts_async_defer.js',
'extra_context': {
'async': True,
'defer': True,
}
}
}
}
......
......@@ -24,8 +24,8 @@ class CompilerTest(TestCase):
def setUp(self):
default_collector.collect()
self.compiler = Compiler()
self.old_compilers = settings.PIPELINE_COMPILERS
settings.PIPELINE_COMPILERS = ['tests.tests.test_compiler.DummyCompiler']
self.old_compilers = settings.COMPILERS
settings.COMPILERS = ['tests.tests.test_compiler.DummyCompiler']
def test_output_path(self):
output_path = self.compiler.output_path("js/helpers.coffee", "js")
......@@ -44,4 +44,4 @@ class CompilerTest(TestCase):
def tearDown(self):
default_collector.clear()
settings.PIPELINE_COMPILERS = self.old_compilers
settings.COMPILERS = self.old_compilers
......@@ -11,15 +11,13 @@ except ImportError:
from unittest.mock import patch # noqa
from django.test import TestCase
from django.test.utils import override_settings
from pipeline.compressors import Compressor, TEMPLATE_FUNC, \
SubProcessCompressor
from pipeline.compressors.yuglify import YuglifyCompressor
from pipeline.collector import default_collector
from tests.utils import _
from tests.utils import _, pipeline_settings
class CompressorTest(TestCase):
......@@ -93,16 +91,20 @@ class CompressorTest(TestCase):
'templates\\')
self.assertEqual(name, 'photo_detail')
@override_settings(PIPELINE_TEMPLATE_SEPARATOR='/')
from pipeline.conf import DEFAULTS
pipeline_settings = DEFAULTS.copy()
pipeline_settings['TEMPLATE_SEPARATOR'] = '/'
def test_template_name_separator(self):
name = self.compressor.template_name('templates/photo/detail.jst',
'templates/')
self.assertEqual(name, 'photo/detail')
name = self.compressor.template_name('templates/photo_edit.jst', '')
self.assertEqual(name, 'photo_edit')
name = self.compressor.template_name('templates\photo\detail.jst',
'templates\\')
self.assertEqual(name, 'photo/detail')
with pipeline_settings(TEMPLATE_SEPARATOR='/'):
name = self.compressor.template_name('templates/photo/detail.jst',
'templates/')
self.assertEqual(name, 'photo/detail')
name = self.compressor.template_name('templates/photo_edit.jst', '')
self.assertEqual(name, 'photo_edit')
name = self.compressor.template_name('templates\photo\detail.jst',
'templates\\')
self.assertEqual(name, 'photo/detail')
def test_compile_templates(self):
templates = self.compressor.compile_templates([_('pipeline/templates/photo/list.jst')])
......
......@@ -49,13 +49,13 @@ class StorageTest(TestCase):
staticfiles_storage._setup()
def test_post_process_dry_run(self):
with pipeline_settings(PIPELINE_JS_COMPRESSOR=None, PIPELINE_CSS_COMPRESSOR=None):
with pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None):
processed_files = PipelineStorage().post_process({}, True)
self.assertEqual(list(processed_files), [])
def test_post_process(self):
storage = PipelineStorage()
with pipeline_settings(PIPELINE_JS_COMPRESSOR=None, PIPELINE_CSS_COMPRESSOR=None):
with pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None):
processed_files = storage.post_process({})
self.assertTrue(('screen.css', 'screen.css', True) in processed_files)
self.assertTrue(('scripts.js', 'scripts.js', True) in processed_files)
......@@ -64,8 +64,8 @@ class StorageTest(TestCase):
"""
Test post_process with a storage that doesn't implement the path method.
"""
with override_settings(STATICFILES_STORAGE='tests.tests.test_storage.PipelineNoPathStorage', PIPELINE_COMPILERS=['tests.tests.test_storage.DummyCSSCompiler']):
with pipeline_settings(PIPELINE_JS_COMPRESSOR=None, PIPELINE_CSS_COMPRESSOR=None):
with override_settings(STATICFILES_STORAGE='tests.tests.test_storage.PipelineNoPathStorage'):
with pipeline_settings(JS_COMPRESSOR=None, CSS_COMPRESSOR=None, COMPILERS=['tests.tests.test_storage.DummyCSSCompiler']):
staticfiles_storage._setup()
try:
call_command('collectstatic', verbosity=0, interactive=False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment