Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-code-block

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-code-block

Simple, effective, and customizable code highlighting for Ember

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by550%
Maintainers
1
Weekly downloads
 
Created
Source

ember-code-block

Simple, effective, and customizable code highlighting for Ember using highlight.js

Usage

let code = `
<html>
  <body>
    <ul></ul>
  </body>
</html>`
{{code-block code language="html"}}

Installation

ember install ember-code-block

Selecting Languages

Highlight.js comes with over 160 language packs, but in practice you'll probably only want to use a handfull. By default this addon won't include any languages in the build to keep it small, instead you must register a language by configuring this addon in your app's environment:

ENV['ember-code-block'] = {
	languages: ['json', 'handlebars', 'javascript'],
}

See all available languages

You will probably want to also configure the style (a.k.a theme):

ENV['ember-code-block'] = {
	style: 'tomorrow-night-eighties',
}

Due to the way the CSS works, you can only load one theme at a time, so you need to configure this on load. This is a limitation of highlight.js.

Running

Running Tests

  • npm test (Runs ember try:testall 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/.

Keywords

FAQs

Package last updated on 20 May 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc