@glorious/demo

@glorious/demo

The easiest way to demonstrate your code in action.

@glorious/demo a uniq node module that helps in demonstrating your code in action!

Get it: npm install @glorious/demo --save

Sample usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import '@glorious/demo/gdemo.min.css';
import GDemo from '@glorious/demo';

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: '$'})
  .command('node ./demo', {onCompleteDelay: 500})
  .respond('Hello World!')
  .command('')
  .end();

P.S: Don't miss to playaround with the demo.

GIF FTW!

@glorious/demo

Suggest a module

Comments