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
fb19d328
Commit
fb19d328
authored
Jul 24, 2015
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't package or optimize assets on devstack
parent
42181aea
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
36 deletions
+101
-36
cms/envs/common.py
+22
-9
cms/envs/devstack.py
+8
-2
cms/envs/test_static_optimized.py
+11
-2
lms/envs/common.py
+39
-19
lms/envs/devstack.py
+11
-2
lms/envs/test_static_optimized.py
+10
-2
No files found.
cms/envs/common.py
View file @
fb19d328
...
...
@@ -277,13 +277,6 @@ XQUEUE_INTERFACE = {
simplefilter
(
'ignore'
)
################################# Middleware ###################################
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS
=
(
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS
=
(
...
...
@@ -460,9 +453,23 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
##### EMBARGO #####
EMBARGO_SITE_REDIRECT_URL
=
None
############################### Pipeline #######################################
############################### PIPELINE #######################################
# Process static files using RequireJS Optimizer
STATICFILES_STORAGE
=
'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
# List of finder classes that know how to find static files in various locations.
# Note: the pipeline finder is included to be able to discover optimized files
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
]
# Don't use compression by default
PIPELINE_CSS_COMPRESSOR
=
None
PIPELINE_JS_COMPRESSOR
=
None
from
openedx.core.lib.rooted_paths
import
rooted_glob
PIPELINE_CSS
=
{
...
...
@@ -550,7 +557,9 @@ PIPELINE_JS_COMPRESSOR = None
STATICFILES_IGNORE_PATTERNS
=
(
"*.py"
,
"*.pyc"
,
# it would be nice if we could do, for example, "**/*.scss",
"*.html"
,
# It would be nice if we could do, for example, "**/*.scss",
# but these strings get passed down to the `fnmatch` module,
# which doesn't support that. :(
# http://docs.python.org/2/library/fnmatch.html
...
...
@@ -563,6 +572,10 @@ STATICFILES_IGNORE_PATTERNS = (
"coffee/*/*/*.coffee"
,
"coffee/*/*/*/*.coffee"
,
# Ignore tests
"spec"
,
"spec_helpers"
,
# Symlinks used by js-test-tool
"xmodule_js"
,
"common_static"
,
...
...
cms/envs/devstack.py
View file @
fb19d328
...
...
@@ -33,8 +33,14 @@ FEATURES['PREVIEW_LMS_BASE'] = "preview." + LMS_BASE
########################### PIPELINE #################################
# Skip RequireJS optimizer in development
STATICFILES_STORAGE
=
'pipeline.storage.PipelineCachedStorage'
# Skip packaging and optimization in development
STATICFILES_STORAGE
=
'pipeline.storage.NonPackagingPipelineStorage'
# Revert to the default set of finders as we don't want the production pipeline
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
]
############################# ADVANCED COMPONENTS #############################
...
...
cms/envs/test_static_optimized.py
View file @
fb19d328
...
...
@@ -20,7 +20,17 @@ DATABASES = {
},
}
######################### Static file overrides ####################################
######################### PIPELINE ####################################
# Use RequireJS optimized storage
STATICFILES_STORAGE
=
'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
# Revert to the default set of finders as we don't want to dynamically pick up files from the pipeline
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
]
# Redirect to the test_root folder within the repo
TEST_ROOT
=
REPO_ROOT
/
"test_root"
...
...
@@ -33,4 +43,3 @@ STATIC_ROOT = (TEST_ROOT / "staticfiles" / "cms").abspath()
# 1. Uglify is by far the slowest part of the build process
# 2. Having full source code makes debugging tests easier for developers
os
.
environ
[
'REQUIRE_BUILD_PROFILE_OPTIMIZE'
]
=
'none'
PIPELINE_JS_COMPRESSOR
=
None
lms/envs/common.py
View file @
fb19d328
...
...
@@ -1115,13 +1115,6 @@ CREDIT_NOTIFICATION_CACHE_TIMEOUT = 5 * 60 * 60
simplefilter
(
'ignore'
)
################################# Middleware ###################################
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS
=
(
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
)
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS
=
(
...
...
@@ -1209,10 +1202,32 @@ MIDDLEWARE_CLASSES = (
# Clickjacking protection can be enabled by setting this to 'DENY'
X_FRAME_OPTIONS
=
'ALLOW'
############################### P
ipeline
#######################################
############################### P
IPELINE
#######################################
# Process static files using RequireJS Optimizer
STATICFILES_STORAGE
=
'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
# List of finder classes that know how to find static files in various locations.
# Note: the pipeline finder is included to be able to discover optimized files
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
'pipeline.finders.PipelineFinder'
,
]
# Don't use compression by default
PIPELINE_CSS_COMPRESSOR
=
None
PIPELINE_JS_COMPRESSOR
=
None
# Setting that will only affect the edX version of django-pipeline until our changes are merged upstream
PIPELINE_COMPILE_INPLACE
=
True
# Don't wrap JavaScript as there is code that depends upon updating the global namespace
PIPELINE_DISABLE_WRAPPER
=
True
# Specify the UglifyJS binary to use
PIPELINE_UGLIFYJS_BINARY
=
'node_modules/.bin/uglifyjs'
from
openedx.core.lib.rooted_paths
import
rooted_glob
courseware_js
=
(
...
...
@@ -1605,8 +1620,6 @@ PIPELINE_JS = {
}
}
PIPELINE_DISABLE_WRAPPER
=
True
# Compile all coffee files in course data directories if they are out of date.
# TODO: Remove this once we move data into Mongo. This is only temporary while
# course data directories are still in use.
...
...
@@ -1627,25 +1640,32 @@ if os.path.isdir(DATA_DIR):
os
.
system
(
"coffee -c
%
s"
%
(
js_dir
/
filename
))
PIPELINE_CSS_COMPRESSOR
=
None
PIPELINE_JS_COMPRESSOR
=
"pipeline.compressors.uglifyjs.UglifyJSCompressor"
STATICFILES_IGNORE_PATTERNS
=
(
"sass/*"
,
"*.py"
,
"*.pyc"
,
"*.html"
,
# It would be nice if we could do, for example, "**/*.scss",
# but these strings get passed down to the `fnmatch` module,
# which doesn't support that. :(
# http://docs.python.org/2/library/fnmatch.html
"sass/*.scss"
,
"sass/*/*.scss"
,
"sass/*/*/*.scss"
,
"sass/*/*/*/*.scss"
,
"coffee/*.coffee"
,
"coffee/*/*.coffee"
,
"coffee/*/*/*.coffee"
,
"coffee/*/*/*/*.coffee"
,
# Ignore tests
"spec"
,
"spec_helpers"
,
# Symlinks used by js-test-tool
"xmodule_js"
,
)
PIPELINE_UGLIFYJS_BINARY
=
'node_modules/.bin/uglifyjs'
# Setting that will only affect the edX version of django-pipeline until our changes are merged upstream
PIPELINE_COMPILE_INPLACE
=
True
################################# DJANGO-REQUIRE ###############################
...
...
lms/envs/devstack.py
View file @
fb19d328
...
...
@@ -85,8 +85,17 @@ def should_show_debug_toolbar(_):
########################### PIPELINE #################################
# # Skip RequireJS optimizer in development
STATICFILES_STORAGE
=
'pipeline.storage.PipelineCachedStorage'
# Skip packaging and optimization in development
STATICFILES_STORAGE
=
'pipeline.storage.NonPackagingPipelineStorage'
# Revert to the default set of finders as we don't want the production pipeline
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
]
# Disable JavaScript compression in development
PIPELINE_JS_COMPRESSOR
=
None
# Whether to run django-require in debug mode.
REQUIRE_DEBUG
=
DEBUG
...
...
lms/envs/test_static_optimized.py
View file @
fb19d328
...
...
@@ -32,7 +32,16 @@ XQUEUE_INTERFACE = {
}
######################### Static file overrides ####################################
######################### PIPELINE ####################################
# Use RequireJS optimized storage
STATICFILES_STORAGE
=
'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
# Revert to the default set of finders as we don't want to dynamically pick up files from the pipeline
STATICFILES_FINDERS
=
[
'staticfiles.finders.FileSystemFinder'
,
'staticfiles.finders.AppDirectoriesFinder'
,
]
# Redirect to the test_root folder within the repo
TEST_ROOT
=
REPO_ROOT
/
"test_root"
...
...
@@ -45,4 +54,3 @@ STATIC_ROOT = (TEST_ROOT / "staticfiles" / "lms").abspath()
# 1. Uglify is by far the slowest part of the build process
# 2. Having full source code makes debugging tests easier for developers
os
.
environ
[
'REQUIRE_BUILD_PROFILE_OPTIMIZE'
]
=
'none'
PIPELINE_JS_COMPRESSOR
=
None
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