highlight-syntax-pastel
v1.0.0
Published
Pastel theme for highlight-syntax
Downloads
6
Maintainers
Readme
highlight-syntax-pastel
Pastel theme for highlight-syntax.
Usage
var Highlight = require('highlight-syntax')
var css = require('sheetify')
var html = require('bel')
var fs = require('fs')
css`
body { margin: 0 }
`
var prefix = css`
:host {
margin: 0;
padding: 2em;
background-color: #333
}
`
css('./index.css')
var highlight = Highlight([ require('highlight-syntax/js') ])
var src = fs.readFileSync(__filename, 'utf8')
var inner = highlight(src, { lang: 'js' })
var el = html`<pre class=${prefix}><code></code></pre>`
el.innerHTML = inner
document.body.appendChild(el)
$ browserify index.js -t sheetify/transform > out.js
Installation
$ npm install highlight-syntax-pastel