Split Content Model code (step 1)#1905
Merged
JiuqingSong merged 10 commits intomasterfrom Jun 22, 2023
Merged
Conversation
juliaroldi
approved these changes
Jun 22, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To better consume Content Model and reduce initial bundle size, I'm splitting content model code into several packages, including
roosterjs-content-model-types: Similar withroosterjs-editor-types, it provides type definitions for Content Model. This package will not generate any target js fileroosterjs-content-model-dom: This package provides dom-to-model and model-to-dom conversionroosterjs-content-model-editor: This package provides ContentModelEditor and its core API, core plugins and other plugins, as well as format API. For now I have not split them into different packages likeroosterjs-editor-core,roosterjs-editor-api,roosterjs-editor-plugins. But later we may do this change if need.roosterjs-content-model: Provide a general API createContentModelEditor(), also re-export functions from other packagesI also moved content model code to folder packages-content-model. After this change, the folder structure is like
Also fixed test cases, and build scripts to adopt new file structures.
After this change, the bundle layout of content model is
