ArkScript-lang / ArkScript-lang/Ark

Improve the ArkEmscripten playground

Offen
#631 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
C++
Sterne
728
Forks
54
Ø Merge
4 Std. 8 Min.
Gemergte PRs (30 T.)
2

Beschreibung

### Is your feature request related to a problem?

The current playground is pretty bare, and the current method of capturing what's printed is not that good (though I have no clue how to make it better):

```js
log = console.log;
var can_capture = false;

window.console.log = (message) => {
log(message);
if (can_capture)
document.getElementById("output").value += message + "\n";
};

var Module = {
onRuntimeInitialized: function () {
document.getElementById("run").addEventListener("click", () => {
document.getElementById("output").value = "";
const code = document.getElementById("code").value;
try {
can_capture = true;
Module.run(code);
} catch (e) {
document.getElementById("output").value = e;
}
can_capture = false;
});
}
};
```

Playground:
Wasm Playground

### Describe the solution you would like

1. Improve the UI/UX of the playground (without having to add Vue, React or other huge libraries)
2. Add more utils / builtins to ArkEmscripten to play with DOM and JavaScript values / functions
3. Find a better way to get ArkScript output
4. Add more tests (currently not tested in the CI, only the compilation is tested)

### Is it a big modification to the language? Leave it if you don't know

- [ ] Breaking change
- [ ] Compiler/syntax modifications
- [ ] Runtime modifications (standard library, modules, packages...)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginnen Sie mit der Untersuchung des aktuellen ArkEmscripten-Playgrounds und des im Issue gezeigten JavaScript-Codes zur Erfassung der Ausgabe. Überprüfen Sie, wie der Playground kompiliert wird und wie die Kompilierung derzeit in CI getestet wird. Die Arbeit ist abgeschlossen, wenn der Playground eine verbesserte UI/UX, eine bessere Erfassung der Ausgabe, zusätzliche DOM- und JavaScript-Utilities sowie Tests für sein Verhalten bietet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, wasm
Bereich
testing, web-dev
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.