Tree-sitter based syntax highlighter for javascript runtimes. Uses helix queries and themes under the hood.
Install treelight
using npm
:
npm i treelight
In your code:
import { highlight } from 'treelight';
const code = highlight(`console.info("Hello World!")`, 'ts');
console.info(code);