Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MarketingPipeline/Code-Runner-Web-Component
A web component that allows you to run high level programming languages on your websites (static websites included!)
https://github.com/MarketingPipeline/Code-Runner-Web-Component
code-editor code-execution code-executor code-runner compiler custom-element github html javascript online-compiler online-ide piston piston-api programming-examples repl run-code static-site web-component web-components web-ide
Last synced: 3 months ago
JSON representation
A web component that allows you to run high level programming languages on your websites (static websites included!)
- Host: GitHub
- URL: https://github.com/MarketingPipeline/Code-Runner-Web-Component
- Owner: MarketingPipeline
- License: gpl-3.0
- Created: 2022-09-23T03:45:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T07:46:47.000Z (3 months ago)
- Last Synced: 2024-07-30T10:58:46.609Z (3 months ago)
- Topics: code-editor, code-execution, code-executor, code-runner, compiler, custom-element, github, html, javascript, online-compiler, online-ide, piston, piston-api, programming-examples, repl, run-code, static-site, web-component, web-components, web-ide
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 49
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Code-Runner-Web-Component
![ezgif-5-d9d9221610](https://user-images.githubusercontent.com/86180097/191913312-754d00aa-0a0a-4812-bed3-774ebdfb66a7.png)
A web component that allows you to run high level programming languages on your website via the public [Piston API](https://github.com/engineer-man/piston#Public-API)
Show your support!
## Example and usage
You can view a demo of the Code Runner web component in use [here.](https://marketingpipeline.github.io/Code-Runner-Web-Component/demo.html)
How to use Code Runner:
Set a
language
attribute to a [supported programming language](#supported-languages) you prefer to use - example below```html
```
include this [script](https://github.com/MarketingPipeline/Code-Runner-Web-Component/blob/main/dist/code-runner-wc.min.js) in your HTML document.
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 -```html
print('hello world')
```
### OptionsAttribute
Meaning
Default
Requiredlanguage
The programming language to execute code withUndefined
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 ![GitHub](https://img.shields.io/github/contributors/MarketingPipeline/Code-Runner-Web-Component)
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](https://github.com/MarketingPipeline/Code-Runner-Web-Component/graphs/contributors) who
participate in this project.## License ![GitHub](https://img.shields.io/github/license/MarketingPipeline/Code-Runner-Web-Component)
This project is licensed under the GPL-3.0 License - see the
[LICENSE.md](https://github.com/MarketingPipeline/Code-Runner-Web-Component/blob/main/LICENSE) file for
details.