Skip to content

Commit

Permalink
remove pyodide (used from within LiveCodes)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Oct 28, 2023
1 parent 1742282 commit a6f415c
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 3,118 deletions.
2 changes: 1 addition & 1 deletion components/playgroundEditor/LiveCodes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Dispatch, SetStateAction, useEffect, useState } from "react";
import type { Config, Playground } from "livecodes";
import LiveCodesPlayground from "livecodes/react";
import { luaTestRunner, type Language } from "lib/livecodes";
import { luaTestRunner, type Language } from "lib/playground/livecodes";
import { useDarkTheme } from "hooks/darkTheme";

export default function LiveCodes({
Expand Down
12 changes: 1 addition & 11 deletions components/playgroundEditor/PlaygroundEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { useDarkTheme } from "hooks/darkTheme";
import { XTerm } from "xterm-for-react";
import { FitAddon } from "xterm-addon-fit";
import CodeRunner from "lib/playground/codeRunner";
import PythonCodeRunner from "lib/playground/pythonCodeRunner";
import PistonCodeRunner from "lib/playground/pistonCodeRunner";
import classes from "./PlaygroundEditor.module.css";

Expand Down Expand Up @@ -46,16 +45,7 @@ export default function PlaygroundEditor({
const [disabled, setDisabled] = useState(false);

const codeRunner = useMemo<CodeRunner>(() => {
let runner: CodeRunner;
switch (language) {
case "python":
runner = new PythonCodeRunner(xtermRef, t);
break;

default:
runner = new PistonCodeRunner(xtermRef, t);
break;
}
const runner = new PistonCodeRunner(xtermRef, t);
setTimeout(() => {
runner.load(code, language).then((r) => {
setReady(true);
Expand Down
2 changes: 1 addition & 1 deletion components/playgroundEditor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dispatch, SetStateAction } from "react";
import { isLiveCodesLanguage } from "lib/livecodes";
import { isLiveCodesLanguage } from "lib/playground/livecodes";
import LiveCodes from "./LiveCodes";
import PlaygroundEditor from "./PlaygroundEditor";

Expand Down
File renamed without changes.
73 changes: 0 additions & 73 deletions lib/playground/pythonCodeRunner.ts

This file was deleted.

18 changes: 0 additions & 18 deletions lib/pyodide.ts

This file was deleted.

Loading

0 comments on commit a6f415c

Please sign in to comment.