New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

recode

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recode

Playback of code typing

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Recode

Pronounced like record but with code, instead.

Video tutorials are fantastic for getting information across quickly, but when pertaining to code, they always seem old fashioned. This is because seeing code appear in a compressed, lossy video doesn't look as crisp as it can, and it isn't interactive (no copy + paste!). Here's the solution: hit record in your text editor, record your video/audio, and then play them back in tandem.

Basic Usage

First, aquire a recorddata.json file that follows the schema.

Add the recode.js and recode.css files to your HTML somewhere. The recode.css is very basic and you only need it if you are using the pre or textarea adapters.

Choose the adapter you want to use. Building your own is possible, but docs for that are still to come (you can check the source if you're impatient):

  • textarea displays a regular textarea. Due to how selections and carets work in disabled textareas, this is a bit buggy
  • pre uses a pre element and works better than a textarea. This is usually the one you should use for the most basic functionality. No syntax highlighting
  • codemirror creates a codemirror instance and runs from that. This is good because it supports syntax highlighting and will allow for multiple selections once the schema supports it
  • ace coming soon

Create an element to contain your Recode instance

<div id="recode"></div>

Run your Recode instance

<script>
  var recode = new Recode({
    element: document.getElementById('recode'),
    recorddata: recorddata
  });
  recode.play();
</script>

Where recorddata is the recorded data as a Javascript object (so parse the JSON before you pass it to the function).

Watch the code fly!

Schema

See SCHEMA.md.

Editor Bindings

License

MIT

FAQs

Package last updated on 29 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts