Merge pull request #25322 from aulasneo/BTR-15

Fix certificate sass assets collection for comprehensive themes
This commit is contained in:
Felipe Montoya
2020-11-10 16:41:38 -05:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -167,6 +167,8 @@ def get_theme_sass_dirs(system, theme_dir):
system_sass_dir = path(system) / "static" / "sass"
sass_dir = theme_dir / system / "static" / "sass"
css_dir = theme_dir / system / "static" / "css"
certs_sass_dir = theme_dir / system / "static" / "certificates" / "sass"
certs_css_dir = theme_dir / system / "static" / "certificates" / "css"
dependencies = SASS_LOOKUP_DEPENDENCIES.get(system, [])
if sass_dir.isdir():
@@ -194,6 +196,17 @@ def get_theme_sass_dirs(system, theme_dir):
],
})
# now compile theme sass files for certificate
if system == 'lms':
dirs.append({
"sass_source_dir": certs_sass_dir,
"css_destination_dir": certs_css_dir,
"lookup_paths": [
sass_dir / "partials",
sass_dir
],
})
return dirs

View File

@@ -252,6 +252,7 @@ class TestPaverWatchAssetTasks(TestCase):
self.expected_sass_directories.extend([
path(TEST_THEME_DIR) / 'lms/static/sass',
path(TEST_THEME_DIR) / 'lms/static/sass/partials',
path(TEST_THEME_DIR) / 'lms/static/certificates/sass',
path(TEST_THEME_DIR) / 'cms/static/sass',
path(TEST_THEME_DIR) / 'cms/static/sass/partials',
])