Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/compressors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,15 @@ Add it to your settings ::

PIPELINE['CSS_COMPRESSOR'] = 'jam.compressors.JamCompressor'
PIPELINE['JS_COMPRESSOR'] = 'jam.compressors.JamCompressor'


Use Shell to run compressor binary (Windows)
============================================

If you have a compressor binary such as Yuglify installed globally using NPM on windows, you can enable ``'USE_SHELL'``,
that way it just searches your PATH.

Then in your settings you could use: ::

PIPELINE['USE_SHELL'] = True
PIPELINE['YUGLIFY_BINARY']: 'yuglify'
2 changes: 1 addition & 1 deletion pipeline/compressors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def execute_command(self, command, content):
argument_list.extend(flattening_arg)

pipe = subprocess.Popen(argument_list, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=settings.USE_SHELL)
if content:
content = smart_bytes(content)
stdout, stderr = pipe.communicate(content)
Expand Down
2 changes: 2 additions & 0 deletions pipeline/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
'LESS_BINARY': '/usr/bin/env lessc',
'LESS_ARGUMENTS': '',

'USE_SHELL': False,

'MIMETYPES': (
(b'text/coffeescript', '.coffee'),
(b'text/less', '.less'),
Expand Down