Commit 28664f24 by Ibrahim Awwal

Ensure that js files are returned in alphabetical order by django-pipeline.

On most systems this seems to be the default behavior, but glob2.glob's order isn't guaranteed and on my machine the order seems to be random, which causes javascript which depends on include order to fail.
parent 5bfb5168
......@@ -426,7 +426,7 @@ main_vendor_js = [
'js/vendor/jquery.qtip.min.js',
]
discussion_js = glob2.glob(PROJECT_ROOT / 'static/coffee/src/discussion/*.coffee')
discussion_js = sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/discussion/*.coffee'))
# Load javascript from all of the available xmodules, and
# prep it for use in pipeline js
......@@ -494,10 +494,10 @@ PIPELINE_JS = {
'source_filenames': [
pth.replace(COMMON_ROOT / 'static/', '')
for pth
in glob2.glob(COMMON_ROOT / 'static/coffee/src/**/*.coffee')
in sorted(glob2.glob(COMMON_ROOT / 'static/coffee/src/**/*.coffee'))
] + [
pth.replace(PROJECT_ROOT / 'static/', '')
for pth in glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee')\
for pth in sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee'))\
if pth not in courseware_only_js and pth not in discussion_js
] + [
'js/form.ext.js',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment