0.1.2 • Published 4 years ago

@tpluscode/wc-runkit v0.1.2

Weekly downloads
19
License
MIT
Repository
github
Last release
4 years ago

@tpluscode/run-kit

Dead simple RunKit web component

Installation

With unpkg, add this to page:

<script src="//unpkg.com/@tpluscode/wc-runkit"></script>

Usage

Add a <run-kit> element with a <pre> inside

<run-kit>
  <pre>
const hello = require("simple-hello-world-example")

myApp.printMsg()
  </pre>
</run-kit>

When using in a static-page generator, you might use triple backticks instead of <pre> to have the highlighted code be displayed until runkit initializes its embed.

<run-kit>

  ```js
const hello = require("simple-hello-world-example")

myApp.printMsg()
  ```
  
</run-kit>

Configuration

All options follow Embed API docs page

Node Version

<run-kit node-version="13"></run-kit>

The default is 12

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago