Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: import XModule source SCSS directly rather than copying
The `xmodule_assets` command copies SCSS source files from xmodule/css to common/static/xmodule/scss, renaming them to `{MD5_HASH}.scss` in order to "remove duplicates". The copied files are then included into the generated SCSS entrypoint files (eg AnnotatableBlockStudio.scss). The "de-deplication" is completely unnecessary: there are only a couple dozen SCSS files, and none of them are duplicates. This copying process is confusing, it complicates our build process, and it makes our SCSS harder to understand. So, in the generated SCSS entrypoint files, we stop importing the *copied* SCSS sources, and just import the *original* SCSS sources instead. For example, common/static/xmodule/descriptors/scss/AboutBlockStudio.scss is changed from: .xmodule_edit.xmodule_AboutBlock { @import "9bdcda00f046f78be79aca7791e1d4fb.scss"; @import "a10fc3e0fd6aca63426a89e75fe69c31.scss"; } to: .xmodule_edit.xmodule_AboutBlock { @import "editor/edit.scss"; @import "html/edit.scss"; } In order to make the `@import` lines work, we add xmodule/css to the list of lookup dirs for XModule SCSS compilation. We also remove the copying logic from `xmodule_assets`, as it is no longer needed. Part of: openedx#32292
- Loading branch information