ember-code-highlight
v1.0.0
Published
Yet another Highlight.js Ember addon that tries to be K.I.S.S.
Downloads
6
Readme
Ember-code-highlight
This is yet another Highlight.js Ember addon.
All the others seemed stale and over complicated. I wanted super simple for those times when I wanted a simple code highlighting and none of the fluff. So things like line numbers and callouts are lest to the the consumer of this addon.
All this does is simply take the component's block and runs highlight.js over it. The rest (escaping, formatting, line numbers, etc.) is left to you to add to the code block.
Usage
{{#code-highlight lang="js"}}
function foobar(baz) {
return 'bazfoo';
}
{{/code-highlight}}
Configuration
Choose a style (default: tomorrow
):
// ember-cli-build.js
var app = new EmberApp({
emberCodeHighlight: {
style: 'solarized-light'
}
});
The list of available styles is available at highlightjs.org.
Installation
git clone <repository-url>
this repositorycd ember-code-highlight
npm install
bower install
Running
ember serve
- Visit your app at http://localhost:4200.
Running Tests
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://ember-cli.com/.