-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscellaneous Repo Improvements #244
Conversation
# Conflicts: # src/bundles/sound/functions.ts
# Conflicts: # src/bundles/scrabble/__tests__/index.ts # src/bundles/scrabble/functions.ts # src/bundles/scrabble/index.ts # src/bundles/unity_academy/UnityAcademy.tsx # src/bundles/unity_academy/UnityAcademyMaths.ts # src/bundles/unity_academy/functions.ts # src/bundles/unity_academy/index.ts # src/tabs/UnityAcademy/index.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one minor comment as below. Could you take a look at the changes I pushed as well, and if it's all good to you, feel free to merge.
Thanks for working on this!
…xternalize # Conflicts: # src/bundles/scrabble/__tests__/index.ts # src/bundles/scrabble/functions.ts # src/bundles/scrabble/index.ts # src/bundles/unity_academy/UnityAcademy.tsx # src/bundles/unity_academy/UnityAcademyMaths.ts # src/bundles/unity_academy/functions.ts # src/bundles/unity_academy/index.ts # src/tabs/UnityAcademy/index.tsx
…y can be added in js-slang and frontend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
…to module-externalize
…xternalize # Conflicts: # src/bundles/scrabble/__tests__/index.ts # src/bundles/scrabble/functions.ts # src/bundles/scrabble/index.ts
…s into module-externalize # Conflicts: # src/bundles/scrabble/__tests__/index.ts # src/bundles/scrabble/functions.ts # src/bundles/scrabble/index.ts # src/bundles/unity_academy/functions.ts
External Packages
There are several packages available on the frontend and in js-slang, making it unnecessary for Source modules to include them when bundled. This PR will further externalize several of these packages (the full list here), reducing the size of files.
In the future, if there are packages that Source modules that require that are also already available at runtime, these packages should also be marked as external, but such changes would also require corresponding updates to the frontenda and/or js-slang
Refinement of Module Scripts
The script system has become increasingly complex. To aid with this I've condensed all the script management code into a single Javascript file. Instead of committing the entire output of compiling module scripts, module scripts can instead be built using the
yarn scripts:build
command (which should be run automatically onpostinstall
). Module script functionality remains identical.yarn test
andyarn scripts:test
should now both work with Windows paths, where previously Jest only recognized posix style paths as valid patterns.Error Handling for
AnimationCanvas
Animations are calculated at runtime, so there is no way for bundle code to detect beforehand if an animation is invalid or will throw an error. As such, an error screen has been added to the various animation canvases which will allow these to throw errors gracefully. Fixes #225.
Change in
throwIfNotRune
Similar to how the functions in
sound
have been modified to allow for custom function names, thethrowIfNotRune
function in therune
bundle has also been modified to allow custom function names to be shown when errors are thrown.Updated
typedoc
Typedoc has since fixed the issue where the README was not getting generated with the rest of the HTML documentation. The original README file has thus been re-included.
Documentation Relocation
The summaries that used to be present in the
functions.ts
files of bundles have been relocated to their entry points. These summaries should now be visible within the HTML documentation. Resolves #221.Tab Development Server
Currently, the frontend is the only way to render module tabs. This means that every change requires a rebuild of the tab, followed by a refresh on the frontend.
This PR will introduce a Vite server that is able to react to changes in tabs and render them live.
For the server to be able to work, components need to be defined as a separate constant, instead of just within the
body()
function:should be defined like this:
Use
yarn devserver
to start the development server.Standardize Line Encoding
This PR also incorporates the changes from #210. With the addition of
.editorconfig
and.gitattributes
hopefully development across OSes should be more consistent.