mirror of
https://github.com/pyscript/pyscript.git
synced 2022-05-01 19:47:48 +03:00
remove unused code in App
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import Tailwind from './Tailwind.svelte';
|
||||
import { loadInterpreter } from './interpreter';
|
||||
import {
|
||||
componentsNavOpen,
|
||||
initializers,
|
||||
loadedEnvironments,
|
||||
mode,
|
||||
@@ -15,14 +14,6 @@
|
||||
let iconSize = 2;
|
||||
let pyodideReadyPromise;
|
||||
|
||||
function bumpSize(evt) {
|
||||
iconSize = 4;
|
||||
}
|
||||
|
||||
function downSize(evt) {
|
||||
iconSize = 2;
|
||||
}
|
||||
|
||||
const initializePyodide = async () => {
|
||||
pyodideReadyPromise = loadInterpreter();
|
||||
let newEnv = {
|
||||
@@ -36,7 +27,6 @@
|
||||
});
|
||||
|
||||
let showNavBar = false;
|
||||
let main = document.querySelector('#main');
|
||||
navBarOpen.subscribe(value => {
|
||||
showNavBar = value;
|
||||
});
|
||||
@@ -61,10 +51,6 @@
|
||||
}
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
function toggleComponentsNavBar(evt) {
|
||||
componentsNavOpen.set(!$componentsNavOpen);
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
@@ -413,6 +413,7 @@ output_manager = OutputManager()
|
||||
|
||||
const loadInterpreter = async function (): Promise<any> {
|
||||
console.log('creating pyodide runtime');
|
||||
// @ts-ignore
|
||||
pyodide = await loadPyodide({
|
||||
stdout: console.log,
|
||||
stderr: console.log,
|
||||
@@ -422,15 +423,6 @@ const loadInterpreter = async function (): Promise<any> {
|
||||
console.log('loading micropip');
|
||||
await pyodide.loadPackage('micropip');
|
||||
console.log('loading pyscript module');
|
||||
// await pyodide.runPythonAsync(`
|
||||
// from pyodide.http import pyfetch
|
||||
// response = await pyfetch("/build/pyscript.py")
|
||||
// with open("pyscript.py", "wb") as f:
|
||||
// content = await response.bytes()
|
||||
// print(content)
|
||||
// f.write(content)
|
||||
// `)
|
||||
// let pkg = pyodide.pyimport("pyscript");
|
||||
|
||||
console.log('creating additional definitions');
|
||||
const output = pyodide.runPython(additional_definitions);
|
||||
|
||||
Reference in New Issue
Block a user