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
d125bac9
Commit
d125bac9
authored
Apr 22, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve syncompress output
parent
19b53f70
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
compress/conf/settings.py
+5
-4
compress/management/commands/synccompress.py
+3
-3
compress/packager.py
+2
-2
No files found.
compress/conf/settings.py
View file @
d125bac9
...
...
@@ -15,12 +15,13 @@ COMPRESS_VERSION_DEFAULT = getattr(settings, 'COMPRESS_VERSION_DEFAULT', '0')
COMPRESS_VERSION_REMOVE_OLD
=
getattr
(
settings
,
'COMPRESS_VERSION_REMOVE_OLD'
,
True
)
COMPRESS_VERSIONING
=
getattr
(
settings
,
'COMPRESS_VERSIONING'
,
'compress.versioning.mtime.MTimeVersioning'
)
COMPRESS_CSS_COMPRESSORS
=
getattr
(
settings
,
'COMPRESS_CSS_COMPRESSORS'
,
[
'compress.compressors.csstidy.YUICompressor'
]
)
'compress.compressors.csstidy.YUICompressor'
]
)
COMPRESS_JS_COMPRESSORS
=
getattr
(
settings
,
'COMPRESS_JS_COMPRESSORS'
,
[
'compress.compressors.csstidy.YUICompressor'
]
)
'compress.compressors.csstidy.YUICompressor'
]
)
COMPRESS_CSS
=
getattr
(
settings
,
'COMPRESS_CSS'
,
{})
COMPRESS_JS
=
getattr
(
settings
,
'COMPRESS_JS'
,
{})
...
...
compress/management/commands/synccompress.py
View file @
d125bac9
...
...
@@ -18,19 +18,19 @@ class Command(NoArgsCommand):
from
compress
import
packager
packager
.
force
=
options
.
get
(
'force'
,
False
)
packager
.
verbose
=
int
(
options
.
get
(
'verbosity'
,
1
))
>=
2
for
package_name
,
package
in
packager
.
packages
[
'css'
]
.
items
():
if
packager
.
verbose
or
packager
.
force
:
print
message
=
"CSS Group '
%
s'"
%
package_name
print
message
print
len
(
message
)
*
'-'
packager
.
pack_stylesheets
(
package
)
print
for
package_name
,
package
in
packager
.
packages
[
'js'
]
.
items
():
if
packager
.
verbose
or
packager
.
force
:
print
message
=
"JS Group '
%
s'"
%
package_name
print
message
print
len
(
message
)
*
'-'
packager
.
pack_javascripts
(
package
)
print
compress/packager.py
View file @
d125bac9
...
...
@@ -28,7 +28,6 @@ class Packager(object):
)
def
individual_url
(
self
,
filename
):
print
settings
.
COMPRESS_URL
,
filename
return
urlparse
.
urljoin
(
settings
.
COMPRESS_URL
,
self
.
compressor
.
relative_path
(
filename
)[
1
:])
def
pack_stylesheets
(
self
,
package
):
...
...
@@ -44,7 +43,8 @@ class Packager(object):
self
.
versioning
.
version
(
package
[
'paths'
]))
self
.
versioning
.
cleanup
(
package
[
'output'
])
if
self
.
verbose
or
self
.
force
:
print
"Saving
%
s"
%
self
.
compressor
.
relative_path
(
output_filename
)
print
"Version:
%
s"
%
version
print
"Saving:
%
s"
%
self
.
compressor
.
relative_path
(
output_filename
)
self
.
save_file
(
output_filename
,
content
)
signal
.
send
(
sender
=
self
,
package
=
package
,
version
=
version
)
else
:
...
...
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