Upgrade to django-pipeline 1.6.14 (#20449)

This commit is contained in:
Jeremy Bowman
2019-05-07 16:01:37 -04:00
committed by GitHub
parent 1caa647621
commit 5eac6aa049
21 changed files with 99 additions and 89 deletions

View File

@@ -105,7 +105,7 @@ def _footer_css_urls(request, package_name):
# to identify the CSS file name(s) to include in the footer.
# We then construct an absolute URI so that external sites (such as the marketing site)
# can locate the assets.
package = settings.PIPELINE_CSS.get(package_name, {})
package = settings.PIPELINE['STYLESHEETS'].get(package_name, {})
paths = [package['output_filename']] if not settings.DEBUG else package['source_filenames']
return [
_footer_static_url(request, path)

View File

@@ -80,7 +80,7 @@ MEDIA_ROOT = TEST_ROOT / "uploads"
WEBPACK_LOADER['DEFAULT']['STATS_FILE'] = TEST_ROOT / "staticfiles" / "lms" / "webpack-stats.json"
# Don't use compression during tests
PIPELINE_JS_COMPRESSOR = None
PIPELINE['JS_COMPRESSOR'] = None
################################# CELERY ######################################

View File

@@ -1336,7 +1336,15 @@ P3P_HEADER = 'CP="Open EdX does not have a P3P policy."'
############################### PIPELINE #######################################
PIPELINE_ENABLED = True
PIPELINE = {
'PIPELINE_ENABLED': True,
'CSS_COMPRESSOR': None,
'JS_COMPRESSOR': 'pipeline.compressors.uglifyjs.UglifyJSCompressor',
# Don't wrap JavaScript as there is code that depends upon updating the global namespace
'DISABLE_WRAPPER': True,
# Specify the UglifyJS binary to use
'UGLIFYJS_BINARY': 'node_modules/.bin/uglifyjs',
}
STATICFILES_STORAGE = 'openedx.core.storage.ProductionStorage'
@@ -1350,15 +1358,6 @@ STATICFILES_FINDERS = [
'pipeline.finders.PipelineFinder',
]
PIPELINE_CSS_COMPRESSOR = None
PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.uglifyjs.UglifyJSCompressor'
# 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 = [
@@ -1504,7 +1503,7 @@ credit_web_view_js = [
'js/src/logger.js',
]
PIPELINE_CSS = {
PIPELINE['STYLESHEETS'] = {
'style-vendor': {
'source_filenames': [
'css/vendor/font-awesome.css',
@@ -1678,7 +1677,7 @@ lms_application_js = [
'js/main.js',
]
PIPELINE_JS = {
PIPELINE['JAVASCRIPT'] = {
'base_application': {
'source_filenames': base_application_js,
'output_filename': 'js/lms-base-application.js',

View File

@@ -99,7 +99,7 @@ FEATURES['ENABLE_API_DOCS'] = True
########################### PIPELINE #################################
PIPELINE_ENABLED = False
PIPELINE['PIPELINE_ENABLED'] = False
STATICFILES_STORAGE = 'openedx.core.storage.DevelopmentStorage'
# Revert to the default set of finders as we don't want the production pipeline
@@ -110,12 +110,12 @@ STATICFILES_FINDERS = [
]
# Disable JavaScript compression in development
PIPELINE_JS_COMPRESSOR = None
PIPELINE['JS_COMPRESSOR'] = None
# Whether to run django-require in debug mode.
REQUIRE_DEBUG = DEBUG
PIPELINE_SASS_ARGUMENTS = '--debug-info'
PIPELINE['SASS_ARGUMENTS'] = '--debug-info'
# Load development webpack donfiguration
WEBPACK_CONFIG_PATH = 'webpack.dev.config.js'

View File

@@ -145,7 +145,7 @@ STATICFILES_DIRS += [
STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage'
# Don't use compression during tests
PIPELINE_JS_COMPRESSOR = None
PIPELINE['JS_COMPRESSOR'] = None
update_module_store_settings(
MODULESTORE,