8

GitHub - MarketingPipeline/Code-Runner-Web-Component: A web component that allow...

 1 year ago
source link: https://github.com/MarketingPipeline/Code-Runner-Web-Component
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Code-Runner-Web-Component

ezgif-5-d9d9221610

A web component that allows you to run high level programming languages on your website via the public Piston API
Show your support!

Example and usage

You can view a demo of the Code Runner web component in use here.

How to use Code Runner:

Set a language attribute to a supported programming language & version attribute to the programming version you prefer to use - example below

<code-runner language="python" version="3"></code-runner>

include this script in your HTML document.

<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/Code-Runner-Web-Component/dist/code-runner-wc.min.js" defer></script> 

How to use Code Runner with Pre-Defined Code:

You can pre-define a code example to run, simply by inserting the code inside of a code-runner element like so -

<code-runner language="python" version="3">print('hello world')</code-runner>

Options

Attribute Meaning Default Required
language The programming language to execute code with Undefined Yes
version The programming language version to use Undefined Yes

Supported Languages

awk, bash, befunge93, brachylog, brainfuck, bqn, c, c++, cjam, clojure, cobol, coffeescript, cow, crystal, csharp, csharp.net, d, dart, dash, dragon, elixir, emacs, emojicode, erlang, file, forte, forth, fortran, freebasic, fsharp.net, fsi, go, golfscript, groovy, haskell, husk, iverilog, japt, java, javascript, jelly, julia, kotlin, lisp, llvm_ir, lolcode, lua, matl, nasm, nasm64, nim, ocaml, octave, osabie, paradoc, pascal, perl, php, ponylang, powershell, prolog, pure, pyth, python, python2, racket, raku, retina, rockstar, rscript, ruby, rust, scala, smalltalk, sqlite3, swift, typescript, basic, basic.net, vlang, vyxal, yeethon, zig,

Contributing

Want to improve this? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!

See also the list of contributors who participate in this project.

License

This project is licensed under the GPL-3.0 License - see the LICENSE.md file for details.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK