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
346aee88
Commit
346aee88
authored
Apr 12, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make django-pipeline only work with raw js and css
parent
9c7ba418
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
46 deletions
+25
-46
cms/envs/common.py
+10
-23
cms/envs/jasmine.py
+1
-1
common/lib/xmodule/xmodule/x_module.py
+1
-1
lms/envs/common.py
+13
-21
No files found.
cms/envs/common.py
View file @
346aee88
...
...
@@ -35,7 +35,7 @@ MITX_FEATURES = {
'AUTH_USE_MIT_CERTIFICATES'
:
False
,
'STUB_VIDEO_FOR_TESTING'
:
False
,
# do not display video when running automated acceptance tests
'STAFF_EMAIL'
:
''
,
# email address for staff (eg to request course creation)
'STUDIO_NPS_SURVEY'
:
True
,
'STUDIO_NPS_SURVEY'
:
True
,
'SEGMENT_IO'
:
True
,
}
ENABLE_JASMINE
=
False
...
...
@@ -195,20 +195,21 @@ from rooted_paths import rooted_glob, remove_root
write_descriptor_styles
(
PROJECT_ROOT
/
"static/sass/descriptor"
,
[
RawDescriptor
,
ErrorDescriptor
])
write_module_styles
(
PROJECT_ROOT
/
"static/sass/module"
,
[
RawDescriptor
,
ErrorDescriptor
])
descriptor_js
=
remove_root
(
descriptor_js
=
[
path
.
replace
(
'.coffee'
,
'.js'
)
for
path
in
remove_root
(
PROJECT_ROOT
/
'static'
,
write_descriptor_js
(
PROJECT_ROOT
/
"static/coffee/descriptor"
,
[
RawDescriptor
,
ErrorDescriptor
]
)
)
module_js
=
remove_root
(
)]
module_js
=
[
path
.
replace
(
'.coffee'
,
'.js'
)
for
path
in
remove_root
(
PROJECT_ROOT
/
'static'
,
write_module_js
(
PROJECT_ROOT
/
"static/coffee/module"
,
[
RawDescriptor
,
ErrorDescriptor
]
)
)
)
]
PIPELINE_CSS
=
{
'base-style'
:
{
...
...
@@ -216,19 +217,17 @@ PIPELINE_CSS = {
'js/vendor/CodeMirror/codemirror.css'
,
'css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css'
,
'css/vendor/jquery.qtip.min.css'
,
'sass/base-style.
s
css'
'sass/base-style.css'
],
'output_filename'
:
'css/cms-base-style.css'
,
},
}
PIPELINE_ALWAYS_RECOMPILE
=
[
'sass/base-style.scss'
]
PIPELINE_JS
=
{
'main'
:
{
'source_filenames'
:
sorted
(
rooted_glob
(
COMMON_ROOT
/
'static/'
,
'coffee/src/**/*.
coffee
'
)
+
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/src/**/*.
coffee
'
)
rooted_glob
(
COMMON_ROOT
/
'static/'
,
'coffee/src/**/*.
js
'
)
+
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/src/**/*.
js
'
)
)
+
[
'js/hesitate.js'
,
'js/base.js'
],
'output_filename'
:
'js/cms-application.js'
,
},
...
...
@@ -237,18 +236,11 @@ PIPELINE_JS = {
'output_filename'
:
'js/cms-modules.js'
,
},
'spec'
:
{
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
coffee
'
)),
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
js
'
)),
'output_filename'
:
'js/cms-spec.js'
}
}
PIPELINE_COMPILERS
=
[
'pipeline.compilers.sass.SASSCompiler'
,
'pipeline.compilers.coffee.CoffeeScriptCompiler'
,
]
PIPELINE_SASS_ARGUMENTS
=
'-t compressed -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'
.
format
(
proj_dir
=
PROJECT_ROOT
)
PIPELINE_CSS_COMPRESSOR
=
None
PIPELINE_JS_COMPRESSOR
=
None
...
...
@@ -260,11 +252,6 @@ STATICFILES_IGNORE_PATTERNS = (
)
PIPELINE_YUI_BINARY
=
'yui-compressor'
PIPELINE_SASS_BINARY
=
'sass'
PIPELINE_COFFEE_SCRIPT_BINARY
=
'coffee'
# Setting that will only affect the MITx version of django-pipeline until our changes are merged upstream
PIPELINE_COMPILE_INPLACE
=
True
############################ APPS #####################################
...
...
cms/envs/jasmine.py
View file @
346aee88
...
...
@@ -27,7 +27,7 @@ PIPELINE_JS['js-test-source'] = {
}
PIPELINE_JS
[
'spec'
]
=
{
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
coffee
'
)),
'source_filenames'
:
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static/'
,
'coffee/spec/**/*.
js
'
)),
'output_filename'
:
'js/cms-spec.js'
}
...
...
common/lib/xmodule/xmodule/x_module.py
View file @
346aee88
...
...
@@ -337,7 +337,7 @@ class XModuleDescriptor(XModuleFields, HTMLSnippet, ResourceTemplates, XBlock):
# cdodge: this is a list of metadata names which are 'system' metadata
# and should not be edited by an end-user
system_metadata_fields
=
[
'data_dir'
,
'published_date'
,
'published_by'
,
'is_draft'
,
system_metadata_fields
=
[
'data_dir'
,
'published_date'
,
'published_by'
,
'is_draft'
,
'discussion_id'
,
'xml_attributes'
]
# A list of descriptor attributes that must be equal for the descriptors to
...
...
lms/envs/common.py
View file @
346aee88
...
...
@@ -394,17 +394,18 @@ from xmodule.hidden_module import HiddenDescriptor
from
rooted_paths
import
rooted_glob
,
remove_root
write_module_styles
(
PROJECT_ROOT
/
'static/sass/module'
,
[
HiddenDescriptor
])
module_js
=
remove_root
(
module_js
=
[
path
.
replace
(
'.coffee'
,
'.js'
)
for
path
in
remove_root
(
PROJECT_ROOT
/
'static'
,
write_module_js
(
PROJECT_ROOT
/
'static/coffee/module'
,
[
HiddenDescriptor
])
)
)
]
courseware_js
=
(
[
'coffee/src/'
+
pth
+
'.
coffee
'
'coffee/src/'
+
pth
+
'.
js
'
for
pth
in
[
'courseware'
,
'histogram'
,
'navigation'
,
'time'
]
]
+
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/modules/**/*.
coffee
'
))
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/modules/**/*.
js
'
))
)
# 'js/vendor/RequireJS.js' - Require JS wrapper.
...
...
@@ -420,13 +421,13 @@ main_vendor_js = [
'js/vendor/jquery.ba-bbq.min.js'
,
]
discussion_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/discussion/**/*.
coffee
'
))
staff_grading_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/staff_grading/**/*.
coffee
'
))
open_ended_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/open_ended/**/*.
coffee
'
))
discussion_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/discussion/**/*.
js
'
))
staff_grading_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/staff_grading/**/*.
js
'
))
open_ended_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/open_ended/**/*.
js
'
))
PIPELINE_CSS
=
{
'application'
:
{
'source_filenames'
:
[
'sass/application.
s
css'
],
'source_filenames'
:
[
'sass/application.css'
],
'output_filename'
:
'css/lms-application.css'
,
},
'course'
:
{
...
...
@@ -435,24 +436,23 @@ PIPELINE_CSS = {
'css/vendor/jquery.treeview.css'
,
'css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css'
,
'css/vendor/jquery.qtip.min.css'
,
'sass/course.
s
css'
'sass/course.css'
],
'output_filename'
:
'css/lms-course.css'
,
},
'ie-fixes'
:
{
'source_filenames'
:
[
'sass/ie.
s
css'
],
'source_filenames'
:
[
'sass/ie.css'
],
'output_filename'
:
'css/lms-ie.css'
,
},
}
PIPELINE_ALWAYS_RECOMPILE
=
[
'sass/application.scss'
,
'sass/ie.scss'
,
'sass/course.scss'
]
PIPELINE_JS
=
{
'application'
:
{
# Application will contain all paths not in courseware_only_js
'source_filenames'
:
sorted
(
set
(
rooted_glob
(
COMMON_ROOT
/
'static'
,
'coffee/src/**/*.
coffee
'
)
+
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/**/*.
coffee
'
))
-
set
(
rooted_glob
(
COMMON_ROOT
/
'static'
,
'coffee/src/**/*.
js
'
)
+
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/**/*.
js
'
))
-
set
(
courseware_js
+
discussion_js
+
staff_grading_js
+
open_ended_js
)
)
+
[
'js/form.ext.js'
,
...
...
@@ -510,12 +510,6 @@ if os.path.isdir(DATA_DIR):
os
.
system
(
"rm
%
s"
%
(
js_dir
/
new_filename
))
os
.
system
(
"coffee -c
%
s"
%
(
js_dir
/
filename
))
PIPELINE_COMPILERS
=
[
'pipeline.compilers.sass.SASSCompiler'
,
'pipeline.compilers.coffee.CoffeeScriptCompiler'
,
]
PIPELINE_SASS_ARGUMENTS
=
'-t compressed -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'
.
format
(
proj_dir
=
PROJECT_ROOT
)
PIPELINE_CSS_COMPRESSOR
=
None
PIPELINE_JS_COMPRESSOR
=
None
...
...
@@ -526,8 +520,6 @@ STATICFILES_IGNORE_PATTERNS = (
)
PIPELINE_YUI_BINARY
=
'yui-compressor'
PIPELINE_SASS_BINARY
=
'sass'
PIPELINE_COFFEE_SCRIPT_BINARY
=
'coffee'
# Setting that will only affect the MITx version of django-pipeline until our changes are merged upstream
PIPELINE_COMPILE_INPLACE
=
True
...
...
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