Repository navigation
Move the DOM-free simulator code into pxtsimcore - #11785
Draft
Eric Anderson (humanapp) wants to merge 1 commit into
Draft
Eric Anderson (humanapp) wants to merge 1 commit into
Eric Anderson (humanapp) wants to merge 1 commit into
Conversation
The runtime, the host and audio seams, the board state classes and the synthesis code move from pxtsim to pxtsimcore, a project compiled without the DOM library, which is the check that nothing in it reaches the browser. The simulator message types, the event bus, the animation queue, the breadboard geometry and the DOM-free half of the debugger are split out of embed.ts, simlib.ts and debugger.ts on the way. The build compiles the two halves and composes built/pxtsim.js and built/pxtsim.d.ts from them, so consumers load the same file and see the same pxsim API. Only moves and the edits that keep the old files compiling; no behaviour changes.
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.
Fourth of the stacked PRs replacing #11665 (4/8).
pxtsiminto two projects sharing thepxsimnamespace:pxtsimcore/for the runtime, board state, sound and host layers,pxtsim/for the embed, views, Web Audio and iframes.pxtsimcorecompiles without thedomlib, so core code that attempts to access browser APIs fails the build.embed.ts,simlib.ts,debugger.tsandruntime.ts, where the DOM-free parts were split out into new core files.built/pxtsim.jsandbuilt/pxtsim.d.tsas the outputs, so nothing changes for consumers.Changes in gulpfile.js
pxtsimtask now compilespxtsimcore, thenpxtsimagainst its declarations, and concatenates the two intobuilt/pxtsim.jsandbuilt/pxtsim.d.ts. Downstream tasks are unchanged.pxtsimcoreto lint,updatestrings, and watch lists.