README.adoc
July 21, 2016 · View on GitHub
= bespoke-prism Hubert Sablonnière https://github.com/hsablonniere v1.0.0, 2016-07-12 // Settings: :idprefix: :idseparator: - //ifdef::env-github[:badges:] // Variables: :release-version: 1.0.2-pre // URIs: :uri-raw-file-base: https://raw.githubusercontent.com/opendevise/bespoke-prism/{release-version}
ifdef::badges[] image:https://img.shields.io/npm/v/bespoke-prism.svg[npm package, link=https://www.npmjs.com/package/bespoke-prism] image:https://img.shields.io/travis/opendevise/bespoke-prism/master.svg[Build Status (Travis CI), link=https://travis-ci.org/opendevise/bespoke-prism] endif::[]
Highlights source code examples in a https://github.com/bespokejs/bespoke[Bespoke.js] presentation using Prism.
== Example
http://opendevise.github.io/bespoke-prism[View the demo] online.
This repository includes a demo folder that shows this plugin in action. To view it locally, you first need to clone this repository:
$ git clone https://github.com/opendevise/bespoke-prism && cd bespoke-prism
Next, install the dependencies inside the project folder using npm:
$ npm install
Finally, visit the file [path]demo/index.html in your browser to see the plugin in action.
== Download
Download the {uri-raw-file-base}/dist/bespoke-prism.min.js[production mode version] or the {uri-raw-file-base}/dist/bespoke-prism.js[development mode version], or use a package manager.
=== npm
$ npm install bespoke-prism
=== Bower
$ bower install bespoke-prism
== Usage
This plugin is shipped in a https://github.com/umdjs/umd[UMD format], meaning it is available as a CommonJS/AMD module or as a browser global.
For example, when using CommonJS modules:
var bespoke = require('bespoke'),
prism = require('bespoke-prism');
bespoke.from('.deck', [
prism()
]);
When using a browser global:
bespoke.from('.deck', [
bespoke.plugins.prism()
]);
== License