1.0.0 • Published 5 months ago

highlight-hcl v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Highlight HCL

Highlight HashiCorp configuration language (HCL) with highlight.js. You can use this library to highlight Terraform, OpenTofu, and Packer.

You can see the highlight results here.

Installation

Using npm to download the library.

npm install highlight.js highlight-hcl

Importing the Library

To use the HCL definition with highlight.js, you have two options for importing:

Optimized Import (Recommended)

Load only the language definitions you need.

// import core hljs api and required languages
import hljs from 'highlight.js/lib/core';
import hcl from 'highlight-hcl';

// register language definition
hljs.registerLanguage('hcl', hcl);

Full Import

Load all languages of highlight.js, please note that this generates a large file.

import hljs from 'highlight.js';
import hcl from 'highlight-hcl';

hljs.registerLanguage('hcl', hcl);

More information about importing highlight.js library, please refer to here.

1.0.0

5 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago