Skip to content

Commit

Permalink
chore: release 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MR-Addict committed Feb 20, 2024
1 parent 873850d commit c8e8d8e
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 73 deletions.
44 changes: 22 additions & 22 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mdbook-repl"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
license = "MIT"
readme = "../README.md"
Expand Down
83 changes: 37 additions & 46 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mdbook-repl",
"private": true,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Buttons/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function Buttons() {
const handlePlay = () => {
const worker = workers.find((w) => w.lang === editor.lang)?.worker;
if (worker) {
setOutput({ status: "idle", data: [] });
setOutput({ status: "running", data: [] });
worker.postMessage({ lang: editor.lang, code: editor.code });
}
};
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/workers/pyodide-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ self.onmessage = async (event) => {
if (!pyodide) await waitPyodideReady();

// run the python code
if (!code) postmessage("finished", [{ color: "normal", msg: "Python code is empty" }]);
if (!code) postmessage("finished", [{ color: "red", msg: "Python code is empty" }]);
else {
try {
postmessage("running", []);
await pyodide.loadPackagesFromImports(code);
await pyodide.runPythonAsync(code + "\nprint('FLUSHHH')"); // FLUSHHH is for flushing the stdout
postmessage("finished", []);
Expand Down

0 comments on commit c8e8d8e

Please sign in to comment.