Repository navigation
kit: ship the editor WASM when packed, and make the editor's colours themeable - #121
Merged
Merged
Conversation
wasm-pack writes a .gitignore of * into pkg-editor/, and yarn pack honours it, so a consumer installing the kit by git got it without the editor WASM. prepare.sh now removes that file after building (and when it skips an existing build).
The token colours, the active line and the selection read --cl-tok-*, --cl-active-line and --cl-selection, defaulting to the playground's current colours, so a page can restyle the editor (a light theme included). The playground looks the same.
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.
Two fixes to
comline-web-kitthat the tutorial needs to use the kit's editor.The editor WASM was missing from the packed kit.
wasm-packwrites a.gitignorecontaining*intopkg-editor/, andyarn packhonours it. So anyone installing the kit by git (#workspace=comline-web-kit) got it withoutpkg-editor/, and importingcomline-web-kit/editorfailed.scripts/prepare.shnow removes that file after building, and also when it skips an existing build.The editor's colours can be themed. The syntax colours, the active line and the selection were fixed in
editor.ts, and suited only a dark background. They now read custom properties, defaulting to today's colours:--cl-tok-kw,-type,-str,-comment,-num,-ann,-var,-fn,-opand-self;--cl-active-lineand--cl-selection.The playground sets none of them, so its colours are unchanged. The tutorial's light theme uses them.
Testing
pkg-editor/is now in the archive, and wasn't before.