forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: commit builtinblocks Webpack config and stub out
xmodule_assets
The Webpack configuration file for built-in XBlock JS used to be generated at build time and git-ignored. It lived at common/static/xmodule/webpack.xmodule.config.js. It was generated because the JS that it referred to was also generated at build-time, and the filenames of those JS modules were not static. Now that its contents have been made entirely static [1], there is no reason we need to continue generating this Webpack configuration file. So, we check it into edx-platform under the name ./webpack.builtinblocks.config.js. We choose to put it in the repo's root directory because the paths contained in the config file are relative to the repo's root. This allows us to behead both the xmodule/static_content.py (`xmodule_assets`) script andthe `process_xmodule_assets` paver task, a major step in removing the need for Python in the edx-platform asset build [2]. It also allows us to delete the `HTMLSnippet` class and all associated attributes, which were exclusively used by xmodule/static_content.py.. We leave `xmodule_assets` and `process_xmodule_assets` in as stubs for now in order to avoid breaking external code (like Tutor) which calls Paver; the entire pavelib/assets.py function will be eventually removed soon anyway [3]. Further, to avoid extraneous refactoring, we keep one method of `HTMLSnippet` around on a few of its former subclasses: `get_html`. This method was originally part of the XModule framework; now, it is left over on a few classes as a simple internal helper method. References: 1. openedx#32480 2. openedx#31800 3. openedx#31895 Part of: openedx#32481
- Loading branch information
1 parent
54467b4
commit 7eb4836
Showing
24 changed files
with
164 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
module.exports = { | ||
"entry": { | ||
"AboutBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js", | ||
"./xmodule/js/src/html/imageModal.js", | ||
"./xmodule/js/common_static/js/vendor/draggabilly.js" | ||
], | ||
"AboutBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/edit.js" | ||
], | ||
"AnnotatableBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/display.js", | ||
"./xmodule/js/src/annotatable/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js" | ||
], | ||
"AnnotatableBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/raw/edit/xml.js" | ||
], | ||
"ConditionalBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/conditional/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js" | ||
], | ||
"ConditionalBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/sequence/edit.js" | ||
], | ||
"CourseInfoBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js", | ||
"./xmodule/js/src/html/imageModal.js", | ||
"./xmodule/js/common_static/js/vendor/draggabilly.js" | ||
], | ||
"CourseInfoBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/edit.js" | ||
], | ||
"CustomTagBlockDisplay": "./xmodule/js/src/xmodule.js", | ||
"CustomTagBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/raw/edit/xml.js" | ||
], | ||
"HtmlBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js", | ||
"./xmodule/js/src/html/imageModal.js", | ||
"./xmodule/js/common_static/js/vendor/draggabilly.js" | ||
], | ||
"HtmlBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/edit.js" | ||
], | ||
"LTIBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/lti/lti.js" | ||
], | ||
"LTIBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/raw/edit/metadata-only.js" | ||
], | ||
"LibraryContentBlockDisplay": "./xmodule/js/src/xmodule.js", | ||
"LibraryContentBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/vertical/edit.js" | ||
], | ||
"PollBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/poll/poll.js", | ||
"./xmodule/js/src/poll/poll_main.js" | ||
], | ||
"PollBlockEditor": "./xmodule/js/src/xmodule.js", | ||
"ProblemBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/capa/display.js", | ||
"./xmodule/js/src/collapsible.js", | ||
"./xmodule/js/src/capa/imageinput.js", | ||
"./xmodule/js/src/capa/schematic.js" | ||
], | ||
"ProblemBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/problem/edit.js" | ||
], | ||
"SequenceBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/sequence/display.js" | ||
], | ||
"SequenceBlockEditor": "./xmodule/js/src/xmodule.js", | ||
"SplitTestBlockDisplay": "./xmodule/js/src/xmodule.js", | ||
"SplitTestBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/sequence/edit.js" | ||
], | ||
"StaticTabBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/display.js", | ||
"./xmodule/js/src/javascript_loader.js", | ||
"./xmodule/js/src/collapsible.js", | ||
"./xmodule/js/src/html/imageModal.js", | ||
"./xmodule/js/common_static/js/vendor/draggabilly.js" | ||
], | ||
"StaticTabBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/html/edit.js" | ||
], | ||
"VideoBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/video/10_main.js" | ||
], | ||
"VideoBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/tabs/tabs-aggregator.js" | ||
], | ||
"WordCloudBlockDisplay": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/assets/word_cloud/src/js/word_cloud.js" | ||
], | ||
"WordCloudBlockEditor": [ | ||
"./xmodule/js/src/xmodule.js", | ||
"./xmodule/js/src/raw/edit/metadata-only.js" | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.