Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
9be0f293
Commit
9be0f293
authored
Jan 02, 2016
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compressor calls
parent
cd14104f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
7 deletions
+16
-7
pipeline/compressors/__init__.py
+1
-1
pipeline/compressors/closure.py
+1
-1
pipeline/compressors/cssmin.py
+1
-1
pipeline/compressors/csstidy.py
+2
-1
pipeline/compressors/uglifyjs.py
+1
-1
pipeline/compressors/yuglify.py
+5
-1
pipeline/compressors/yui.py
+5
-1
No files found.
pipeline/compressors/__init__.py
View file @
9be0f293
...
...
@@ -243,7 +243,7 @@ class SubProcessCompressor(CompressorBase):
else
:
argument_list
.
extend
(
flattening_arg
)
pipe
=
subprocess
.
Popen
(
argument_list
,
s
hell
=
True
,
s
tdout
=
subprocess
.
PIPE
,
pipe
=
subprocess
.
Popen
(
argument_list
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
if
content
:
content
=
smart_bytes
(
content
)
...
...
pipeline/compressors/closure.py
View file @
9be0f293
...
...
@@ -6,5 +6,5 @@ from pipeline.compressors import SubProcessCompressor
class
ClosureCompressor
(
SubProcessCompressor
):
def
compress_js
(
self
,
js
):
command
=
'
%
s
%
s'
%
(
settings
.
CLOSURE_BINARY
,
settings
.
CLOSURE_ARGUMENTS
)
command
=
(
settings
.
CLOSURE_BINARY
,
settings
.
CLOSURE_ARGUMENTS
)
return
self
.
execute_command
(
command
,
js
)
pipeline/compressors/cssmin.py
View file @
9be0f293
...
...
@@ -6,5 +6,5 @@ from pipeline.compressors import SubProcessCompressor
class
CSSMinCompressor
(
SubProcessCompressor
):
def
compress_css
(
self
,
css
):
command
=
"
%
s
%
s"
%
(
settings
.
CSSMIN_BINARY
,
settings
.
CSSMIN_ARGUMENTS
)
command
=
(
settings
.
CSSMIN_BINARY
,
settings
.
CSSMIN_ARGUMENTS
)
return
self
.
execute_command
(
command
,
css
)
pipeline/compressors/csstidy.py
View file @
9be0f293
...
...
@@ -10,8 +10,9 @@ class CSSTidyCompressor(SubProcessCompressor):
def
compress_css
(
self
,
css
):
output_file
=
tempfile
.
NamedTemporaryFile
(
suffix
=
'.pipeline'
)
command
=
'
%
s -
%
s
%
s'
%
(
command
=
(
settings
.
CSSTIDY_BINARY
,
"-"
,
settings
.
CSSTIDY_ARGUMENTS
,
output_file
.
name
)
...
...
pipeline/compressors/uglifyjs.py
View file @
9be0f293
...
...
@@ -6,7 +6,7 @@ from pipeline.compressors import SubProcessCompressor
class
UglifyJSCompressor
(
SubProcessCompressor
):
def
compress_js
(
self
,
js
):
command
=
'
%
s
%
s'
%
(
settings
.
UGLIFYJS_BINARY
,
settings
.
UGLIFYJS_ARGUMENTS
)
command
=
(
settings
.
UGLIFYJS_BINARY
,
settings
.
UGLIFYJS_ARGUMENTS
)
if
self
.
verbose
:
command
+=
' --verbose'
return
self
.
execute_command
(
command
,
js
)
pipeline/compressors/yuglify.py
View file @
9be0f293
...
...
@@ -6,7 +6,11 @@ from pipeline.compressors import SubProcessCompressor
class
YuglifyCompressor
(
SubProcessCompressor
):
def
compress_common
(
self
,
content
,
compress_type
,
arguments
):
command
=
'
%
s --type=
%
s
%
s'
%
(
settings
.
YUGLIFY_BINARY
,
compress_type
,
arguments
)
command
=
(
settings
.
YUGLIFY_BINARY
,
"--type={}"
.
format
(
compress_type
),
arguments
)
return
self
.
execute_command
(
command
,
content
)
def
compress_js
(
self
,
js
):
...
...
pipeline/compressors/yui.py
View file @
9be0f293
...
...
@@ -6,7 +6,11 @@ from pipeline.compressors import SubProcessCompressor
class
YUICompressor
(
SubProcessCompressor
):
def
compress_common
(
self
,
content
,
compress_type
,
arguments
):
command
=
'
%
s --type=
%
s
%
s'
%
(
settings
.
YUI_BINARY
,
compress_type
,
arguments
)
command
=
(
settings
.
YUI_BINARY
,
"--type={}"
.
format
(
compress_type
),
arguments
)
return
self
.
execute_command
(
command
,
content
)
def
compress_js
(
self
,
js
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment