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
b360bfcd
Commit
b360bfcd
authored
Sep 15, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure templates get compiled properly
parent
e55cfa0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
pipeline/compressors/__init__.py
+3
-5
No files found.
pipeline/compressors/__init__.py
View file @
b360bfcd
...
...
@@ -54,6 +54,7 @@ class Compressor(object):
js
=
self
.
concatenate
(
paths
)
if
templates
:
js
=
js
+
self
.
compile_templates
(
templates
)
js
=
"(function() {
%
s }).call(this);"
%
js
js
=
getattr
(
self
.
js_compressor
(
verbose
=
self
.
verbose
),
'compress_js'
)(
js
)
return
js
...
...
@@ -88,10 +89,8 @@ class Compressor(object):
contents
)
return
"
\n
"
.
join
([
"(function(){"
,
"
%(namespace)
s =
%(namespace)
s || {};"
%
{
'namespace'
:
namespace
},
compiled
,
"})();"
compiled
])
def
template_name
(
self
,
path
,
base
):
...
...
@@ -120,8 +119,7 @@ class Compressor(object):
def
concatenate
(
self
,
paths
):
"""Concatenate together a list of files"""
content
=
'
\n
'
.
join
([
self
.
read_file
(
path
)
for
path
in
paths
])
return
"(function() {
%
s }).call(this);"
%
content
return
'
\n
'
.
join
([
self
.
read_file
(
path
)
for
path
in
paths
])
def
construct_asset_path
(
self
,
asset_path
,
css_path
,
variant
=
None
):
"""Return a rewritten asset URL for a stylesheet"""
...
...
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