Merge pull request #9059 from edx/andya/faster-update-assets

Don't package or optimize assets on devstack
This commit is contained in:
Andy Armstrong
2015-09-08 16:48:11 -04:00
6 changed files with 101 additions and 36 deletions

View File

@@ -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",

View File

@@ -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 #############################

View File

@@ -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