README
Glorious Demo
The easiest way to demonstrate your code in action.
Installation
npm install @glorious/demo --save
Basic Usage
<link rel="stylesheet" href="node_modules/@glorious/demo/dist/gdemo.min.css">
<script src="node_modules/@glorious/demo/dist/gdemo.min.js"></script>
Note: If you're not into package management, load it from a third-party CDN provider.
// Constructor receives a selector that indicates
// where to inject the demonstration in your page.
const demo = new GDemo('#container');
const code = `
function greet(){
console.log("Hello World!");
}
greet();
`
demo
.openApp('editor', {minHeight: '350px', windowTitle: 'demo.js'})
.write(code, {onCompleteDelay: 1500})
.openApp('terminal', {minHeight: '350px', promptString: '