Kipper icon indicating copy to clipboard operation
Kipper copied to clipboard

[Feature] Support Kipper `<script type="text/kipper"></script>` tags

Open Luna-Klatzer opened this issue 2 years ago • 3 comments

Affected area by change:

  • Compiler Source Code: no
  • CLI: no
  • Documentation: yes

Short Introduction and Summary Implement a basic script tag, which allows the usage of <script type="text/kipper"></script> for kipper code, which removes the need to initialise and call the compiler like planned in the release v0.1.0.

Is your request related to a problem? Please describe.

Currently, Kipper is mostly only developer-friendly and not very intuitive for beginners, as you have to understand the background of Kipper and understand how to use JS in a browser, which seems unnecessarily complicated.

Describe the solution you'd like

Implement automatic detection for script tags that have the type text/kipper, which will be automatically converted to TS, compiled down to JS and executed using the browser.

Example:

<script type="text/kipper">
  /* Simple Hello World Program */
  call print("Hello world!");
</script>

Describe alternatives you've considered

Create a new function called Kipper.runAll(), which would compile and run all script tags instead of automatically running all kipper-tags.

Additional context

None.

Luna-Klatzer avatar Apr 01 '22 20:04 Luna-Klatzer