Skip to content

apple/highlightjs-pkl

highlightjs-pkl

NPM Version

This repository hosts a Highlight.js library for the Pkl programming language.

Usage

Simple Usage

Simply include the Highlight.js library as an asset in your HTML:

<script type="text/javascript" src="/path/to/highlightjs.min.js" />
<script type="text/javascript" src="/path/to/highlightjs-pkl/dist/pkl.min.js" />
<script type="text/javascript">
  hljs.highlightAll();
</script>

Node.js

To use from Node.js, or when bundled with Webpack (or another packer):

npm install @apple/highlightjs-pkl

And import as an ES6 module:

import hljs from "highlight.js";
import pkl from "@apple/highlightjs-pkl";

hljs.registerLanguage("pkl", pkl);

Alternative usage patterns.

There's a lot more ways to use highlight.js. For more information, see their README.

License

highlightjs-pkl is released under the Apache 2.0 License. See LICENSE file for details.

Highlight.js is released under the BSD 3-Clause License. See LICENSE file for details.

About

Highlight.js syntax highlighting for Pkl

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published