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

prismjs-glimmer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prismjs-glimmer

Glimmer syntax highlighting with Prism.JS

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

prismjs-glimmer

npm version code quality

glimmer syntax highlighting with Prism.js

Install

yarn add prismjs-glimmer
# or
npm install prismjs-glimmer

Usage

import Prism from 'prismjs';
import { setup } from 'prismjs-glimmer';

setup(Prism);

Prism.highlightAll();
  • the javascript language must be registered before setup is called.
  • setup must be called before any highlighting occurs.

Supported language tags:

<pre>
  <code class="language-{tag}">

where {tag} could be:

  • glimmer
  • hbs
  • html.hbs
  • html.handlebars
  • htmlbars

NOTE handlebars highlighting will use glimmer highlighting when this plugin is present

CDN Usage

Traditional Script Tags

<script type="text/javascript" src="/cdn/path/to/prismjs.min.js"></script>
<script type="text/javascript" src="/cdn/path/to/prismjs-glimmer/glimmer.js"></script>
<script type="text/javascript">Prism.highlightAll();</script>

Node / cjs / require

const Prism = require('prismjs');
const { setup } = require('prismjs-glimmer');

setup(Prism);

Prism.highlightAll();

Only Node 14 is supported

Node ES Modules / import

import Prism from 'prismjs';
import { setup } from 'prismjs-glimmer';

setup(Prism);

Prism.highlightAll();

With Node 14, launch with

NODE_OPTIONS="--experimental-vm-modules" node your-module-script.js

Contributing

Debug with yarn debug -p 4201 Visit http://localhost:4201

Run Tets with yarn test or npm run test

FAQs

Package last updated on 08 May 2021

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