Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
5dd4e19c
Commit
5dd4e19c
authored
Jul 23, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move vendor js into a single file
parent
67a18ec5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
lms/envs/common.py
+27
-4
lms/templates/main.html
+4
-6
No files found.
lms/envs/common.py
View file @
5dd4e19c
...
...
@@ -301,19 +301,42 @@ PIPELINE_CSS = {
PIPELINE_ALWAYS_RECOMPILE
=
[
'sass/application.scss'
,
'sass/ie.scss'
]
courseware_only_js
=
[
PROJECT_ROOT
/
'static/coffee/src/'
+
pth
+
'.coffee'
for
pth
in
[
'courseware'
,
'histogram'
,
'navigation'
,
'time'
,
]
]
courseware_only_js
+=
[
pth
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/modules/**/*.coffee'
)
]
courseware_only_js
=
[
PROJECT_ROOT
/
'static/coffee/src/'
+
pth
+
'.coffee'
for
pth
in
[
'courseware'
,
'histogram'
,
'navigation'
,
'time'
,
]
]
courseware_only_js
+=
[
pth
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/modules/**/*.coffee'
)
]
main_vendor_js
=
[
'js/vendor/jquery.min.js'
,
'js/vendor/jquery-ui.min.js'
,
'js/vendor/swfobject/swfobject.js'
,
'js/vendor/jquery.cookie.js'
,
'js/vendor/jquery.qtip.min.js'
,
]
PIPELINE_JS
=
{
'application'
:
{
# Application will contain all paths not in courseware_only_js
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/**/*.coffee'
)
if
pth
not
in
courseware_only_js
],
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/**/*.coffee'
)
\
if
pth
not
in
courseware_only_js
]
+
[
'js/form.ext.js'
],
'output_filename'
:
'js/application.js'
},
'courseware'
:
{
'courseware'
:
{
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
courseware_only_js
],
'output_filename'
:
'js/courseware.js'
},
'main_vendor'
:
{
'source_filenames'
:
main_vendor_js
,
'output_filename'
:
'js/main_vendor.js'
,
},
'spec'
:
{
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/spec/**/*.coffee'
)],
'output_filename'
:
'js/spec.js'
...
...
lms/templates/main.html
View file @
5dd4e19c
...
...
@@ -22,18 +22,16 @@
<![endif]-->
% endif
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery-ui.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/swfobject/swfobject.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery.cookie.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery.qtip.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/form.ext.js')}"
></script>
% if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
<
%
static:js
group=
'main_vendor'
/>
<
%
static:js
group=
'application'
/>
% endif
% if not settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
% for jsfn in [ '/static/%s' % x.replace('.coffee','.js') for x in settings.PIPELINE_JS['main_vendor']['source_filenames'] ]:
<script
type=
"text/javascript"
src=
"${jsfn}"
></script>
% endfor
% for jsfn in [ '/static/%s' % x.replace('.coffee','.js') for x in settings.PIPELINE_JS['application']['source_filenames'] ]:
<script
type=
"text/javascript"
src=
"${jsfn}"
></script>
% endfor
...
...
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