npm promotes metadefinitions
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

bespoke-run

1.0.1 • Public • Published

Build Status

bespoke-run

Run your code snippets in Bespoke.js

Download

Download the production version or the development version, or use a package manager.

Usage

This plugin is shipped in a UMD format, meaning that it is available as a CommonJS/AMD module or browser global.

For example, when using CommonJS modules:


```js
var bespoke = require('bespoke'),
  classes = require('bespoke-classes');
  camera = require('bespoke-run');

bespoke.from('article', [
  classes(),
  run()
]);

When using browser globals:

bespoke.from('article', [
  bespoke.plugins.classes(),
  bespoke.plugins.run()
]);

When you want to run a piece of code in your browser, just put it between <code></code> tags, then add an anchor with the 'data-bespoke-run' property, like so:

<section>
  <code>alert(2 + 2)</code>
  <a data-bespoke-run>Run!</a>
</section>

If you want your code snippet to run automatically before advancing to the next slide, just do:

<section>
  <code data-bespoke-autorun>alert(2 + 2)</code>
</section>

Package managers

Bower

$ bower install bespoke-run

npm

$ npm install bespoke-run

Credits

This plugin was built with generator-bespokeplugin.

License

MIT License

install

npm i bespoke-run

Downloadsweekly downloads

0

version

1.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability