Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaacvando/highlightjs-roc
Highlight.js syntax highlighting for Roc
https://github.com/isaacvando/highlightjs-roc
highlightjs roc-lang syntax-highlighting
Last synced: 22 days ago
JSON representation
Highlight.js syntax highlighting for Roc
- Host: GitHub
- URL: https://github.com/isaacvando/highlightjs-roc
- Owner: isaacvando
- License: upl-1.0
- Created: 2024-09-08T21:46:55.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T18:00:13.000Z (5 months ago)
- Last Synced: 2025-01-03T01:38:11.686Z (28 days ago)
- Topics: highlightjs, roc-lang, syntax-highlighting
- Language: Roc
- Homepage: https://www.npmjs.com/package/highlightjs-roc
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# highlightjs-roc
Syntax highlighting for Roc via highlight.js.
### Usage
To use the package with Node, import the module and register it with highlight.js:
```javascript
import hljs from "highlight.js";
import hljsRoc from "highlightjs-roc";hljs.registerLanguage("roc", hljsRoc);
hljs.highlightAll();
```After installing the package, you can use the default Roc theme by including the CSS file in your HTML:
```html
```
Or if you're using a bundler, you can import it in your JavaScript:
```javascript
import "highlightjs-roc/styles/roc-default.css";
```### Contributing
PRs are very welcome! An easy way to test your changes is to update [roc.js](./src/roc.js) or [roc-default.css](./styles/roc-default.css), and then run `node example/server.js` and open [localhost:3000](http://localhost:3000) to see your changes.