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 Tailwind from './Tailwind.svelte';
|
||||||
import { loadInterpreter } from './interpreter';
|
import { loadInterpreter } from './interpreter';
|
||||||
import {
|
import {
|
||||||
componentsNavOpen,
|
|
||||||
initializers,
|
initializers,
|
||||||
loadedEnvironments,
|
loadedEnvironments,
|
||||||
mode,
|
mode,
|
||||||
@@ -15,14 +14,6 @@
|
|||||||
let iconSize = 2;
|
let iconSize = 2;
|
||||||
let pyodideReadyPromise;
|
let pyodideReadyPromise;
|
||||||
|
|
||||||
function bumpSize(evt) {
|
|
||||||
iconSize = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
function downSize(evt) {
|
|
||||||
iconSize = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
const initializePyodide = async () => {
|
const initializePyodide = async () => {
|
||||||
pyodideReadyPromise = loadInterpreter();
|
pyodideReadyPromise = loadInterpreter();
|
||||||
let newEnv = {
|
let newEnv = {
|
||||||
@@ -36,7 +27,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
let showNavBar = false;
|
let showNavBar = false;
|
||||||
let main = document.querySelector('#main');
|
|
||||||
navBarOpen.subscribe(value => {
|
navBarOpen.subscribe(value => {
|
||||||
showNavBar = value;
|
showNavBar = value;
|
||||||
});
|
});
|
||||||
@@ -61,10 +51,6 @@
|
|||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
};
|
};
|
||||||
|
|
||||||
function toggleComponentsNavBar(evt) {
|
|
||||||
componentsNavOpen.set(!$componentsNavOpen);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
@@ -413,6 +413,7 @@ output_manager = OutputManager()
|
|||||||
|
|
||||||
const loadInterpreter = async function (): Promise<any> {
|
const loadInterpreter = async function (): Promise<any> {
|
||||||
console.log('creating pyodide runtime');
|
console.log('creating pyodide runtime');
|
||||||
|
// @ts-ignore
|
||||||
pyodide = await loadPyodide({
|
pyodide = await loadPyodide({
|
||||||
stdout: console.log,
|
stdout: console.log,
|
||||||
stderr: console.log,
|
stderr: console.log,
|
||||||
@@ -422,15 +423,6 @@ const loadInterpreter = async function (): Promise<any> {
|
|||||||
console.log('loading micropip');
|
console.log('loading micropip');
|
||||||
await pyodide.loadPackage('micropip');
|
await pyodide.loadPackage('micropip');
|
||||||
console.log('loading pyscript module');
|
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');
|
console.log('creating additional definitions');
|
||||||
const output = pyodide.runPython(additional_definitions);
|
const output = pyodide.runPython(additional_definitions);
|
||||||
|
|||||||
Reference in New Issue
Block a user