New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

highlight-hcl

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlight-hcl

A highlight.js plugin for hashicorp configuration language

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

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:

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.

Keywords

highlight.js

FAQs

Package last updated on 04 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts