1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-13 05:19:59 +00:00
CC-Tweaked/doc/events
Jonathan Coates c0643fadca
Build a web-based emulator for the documentation site (#1597)
Historically we've used copy-cat to provide a web-based emulator for
running example code on our documentation site. However, copy-cat is
often out-of-date with CC:T, which means example snippets fail when you
try to run them!

This commit vendors in copy-cat (or rather an updated version of it)
into CC:T itself, allowing us to ensure the emulator is always in sync
with the mod.

While the ARCHITECTURE.md documentation goes into a little bit more
detail here, the general implementation is as follows

 - In project/src/main we implement the core of the emulator. This
   includes a basic reimplementation of some of CC's classes to work on
   the web (mostly the HTTP API and ComputerThread), and some additional
   code to expose the computers to Javascript.

 - This is all then compiled to Javascript using [TeaVM][1] (we actually
   use a [personal fork of it][2] as there's a couple of changes I've
   not upstreamed yet).

 - The Javascript side then pulls in the these compiled classes (and
   the CC ROM) and hooks them up to [cc-web-term][3] to display the
   actual computer.

 - As we're no longer pulling in copy-cat, we can simplify our bundling
   system a little - we now just compile to ESM modules directly.

[1]: https://github.com/konsoletyper/teavm
[2]: https://github.com/SquidDev/teavm/tree/squid-patches
[3]: https://github.com/squiddev-cc/cc-web-term
2023-10-03 09:19:19 +01:00
..
alarm.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
char.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
computer_command.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
disk_eject.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
disk.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
file_transfer.md Build a web-based emulator for the documentation site (#1597) 2023-10-03 09:19:19 +01:00
http_check.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
http_failure.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
http_success.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
key_up.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
key.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
modem_message.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
monitor_resize.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
monitor_touch.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
mouse_click.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
mouse_drag.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
mouse_scroll.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
mouse_up.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
paste.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
peripheral_detach.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
peripheral.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
rednet_message.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
redstone.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
speaker_audio_empty.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
task_complete.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
term_resize.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
terminate.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
timer.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
turtle_inventory.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
websocket_closed.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
websocket_failure.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
websocket_message.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00
websocket_success.md Use standard Markdown link syntax for references 2023-08-24 11:23:33 +01:00