cycle-runkit
Cycle.js RunKit Component.
Install
$ npm i -S cycle-runkit
Add the RunKit embed library to your page:
... ...
Usage
const Embed = module { const embed = return DOM: embedDOM }
Sources
props
The following parameters are properties on the props
property of the sources object.
source : string
Specify the source code that the notebook will use.
readOnly : boolean
If true
, the user will not be able to edit or run the embed.
mode : string
If 'endpoint'
, the notebook will be run as an endpoint and a link to the served page will be shown.
nodeVersion : string
Request a version or semver range for the node engine.
env : [string]
Provide a list of environment variables accessible in the notebook through process.env
.
title : string
Provide a title for the notebook when opened on RunKit.
minHeight : string
Provide a minimum height for the embed ('130px'
by default).
packageTimestamp : number
Specify the Unix time in milliseconds at which packages should resolved. Packages published after the date will be ignored.
preamble : string
Specify source code that is run before the main source. This code will not be shown in the embed.
evaluate : stream ()
Evaluate the notebook.
Sinks
onLoad : stream ()
Emits when the embed is loaded.
const embed = embedonLoad
onURLChanged : stream ()
Emits whenever the embed's URL changes.
const embed = embedonURLChanged
onEvaluate : stream ()
Emits whenever the embed is evaluated.
const embed = embedonEvaluate