Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kyleplo/elucidate

Simple, light syntax highlighter for the web.
https://github.com/kyleplo/elucidate

syntax-highlighting

Last synced: about 1 month ago
JSON representation

Simple, light syntax highlighter for the web.

Awesome Lists containing this project

README

        

# elucidate
Simple, light syntax highlighter for the web.

See the [hosted demo](https://gh.kyleplo.com/elucidate/)

## Installation
Get the library from NPM
```
npm install @kyleplo/elucidate
```

## Importing
This library supports usage as both an ES6 module and a CommonJS module, as well as in the browser.

### ES6
```js
import elucidate from "@kyleplo/elucidate"
```

### CommonJS
```js
const elucidate = require("@kyleplo/elucidate");
```

### Browser
```html

```

Or host `bundle.min.js` yourself.

## Usage
Get syntax highlighting HTML
```js
elucidate(`
alert("hello world");
`, "javascript");
//