-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is obviously too big but also hard to split. The main goal is to build standalone modules instead of using a complicated async loading workflow, as to ease development, optimization, and usage. This also include a huge rewrite of the docs to accommodate for the change and make them more readable.
- Loading branch information
1 parent
ac44636
commit 816dd62
Showing
37 changed files
with
302 additions
and
510 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
date: | ||
status: | ||
--- | ||
|
||
# Standalone bundles | ||
|
||
## Context | ||
|
||
As of now, Orejime is split into many chunks to isolate the core from the language and UI. | ||
However, it is often used on websites using a single language, and always a single theme. | ||
|
||
## Considerations | ||
|
||
* Async loading relies on bundler magic to locate chunks. | ||
* A bundle containing the core, lang and UI is more optimized than when split and loaded asynchronously, because resources are mutualized and compression acts on the whole bundle at once. Also, this save the time needed to import the chunks. | ||
* Loading different versions of a bundle requires no more work than setting options in the config. In most cases, this will actually be easier. | ||
* The split was meant to reduce network and preocessing usage by loading the bare minimum code. However, Orejime would pop anytime a user visits a website for the first time, and the UI would thus be loaded and cached. We might as well load and cache the whole bundle at once. | ||
* Generating a bundle for each combination of themes and languages could lead to bloat, but we shouldn't add lots of themes. Anyways, even a large list of bundles wouldn't really be a problem, as long as each one is optimized. | ||
|
||
## Decision | ||
|
||
Orejime will now be distributed as many standalone packages, each providing a single theme and language. | ||
For example, `orejime-dsfr-en` would provide orejime with the DSFR theme and the english translations. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.