[next] Ditch handy shortcuts for good (#1537)

This commit is contained in:
Andrea Giammarchi
2023-06-15 17:08:28 +02:00
committed by GitHub
parent 6284c02032
commit 6df5905b2b
33 changed files with 101 additions and 84 deletions

View File

@@ -15,7 +15,7 @@
<script type="module">
import { registerPlugin } from "@pyscript/core";
registerPlugin("mpy-script", {
type: "micropython", // or just 'mpy'
type: "micropython",
async onRuntimeReady(micropython, element) {
console.log(micropython);
// Somehow this doesn't work in MicroPython

View File

@@ -15,7 +15,7 @@
<script type="module">
import { registerPlugin } from "@pyscript/core";
registerPlugin("lua-script", {
type: "wasmoon", // or just 'lua'
type: "wasmoon",
async onRuntimeReady(wasmoon, element) {
// Somehow this doesn't work in Wasmoon
wasmoon.io.stdout = (message) => {

View File

@@ -19,7 +19,7 @@ const sharedPyodide = new Promise((resolve) => {
const config = pyConfig?.getAttribute("src") || pyConfig?.textContent;
registerPlugin("py-script", {
config,
type: "pyodide", // or just 'py'
type: "pyodide",
codeBeforeRunWorker: `print('codeBeforeRunWorker')`,
codeAfterRunWorker: `print('codeAfterRunWorker')`,
onBeforeRun(pyodide, node) {