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
fa27e1d6
Commit
fa27e1d6
authored
Jun 07, 2016
by
David Trowbridge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #569 from Blender3D/configurable-wrapper
Make the JS wrapper configurable
parents
aeca70f5
b5198cdc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
docs/configuration.rst
+4
-1
pipeline/compressors/__init__.py
+1
-1
pipeline/conf.py
+1
-0
No files found.
docs/configuration.rst
View file @
fa27e1d6
...
...
@@ -298,4 +298,7 @@ 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 ``DISABLE_WRAPPER`` to ``True``.
You can override this behavior by setting ``DISABLE_WRAPPER`` to ``True``. If you want to use your own wrapper, change
the ``JS_WRAPPER`` setting. For example: ::
JS_WRAPPER = "(function(){stuff();%s})();"
pipeline/compressors/__init__.py
View file @
fa27e1d6
...
...
@@ -62,7 +62,7 @@ class Compressor(object):
js
=
js
+
self
.
compile_templates
(
templates
)
if
not
settings
.
DISABLE_WRAPPER
:
js
=
"(function() {
\n
%
s
\n
}).call(this);"
%
js
js
=
settings
.
JS_WRAPPER
%
js
compressor
=
self
.
js_compressor
if
compressor
:
...
...
pipeline/conf.py
View file @
fa27e1d6
...
...
@@ -38,6 +38,7 @@ DEFAULTS = {
'TEMPLATE_SEPARATOR'
:
"_"
,
'DISABLE_WRAPPER'
:
False
,
'JS_WRAPPER'
:
"(function() {
\n
%
s
\n
}).call(this);"
,
'CSSTIDY_BINARY'
:
'/usr/bin/env csstidy'
,
'CSSTIDY_ARGUMENTS'
:
'--template=highest'
,
...
...
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