1.1.0-beta.4 • Published 10 months ago

hcl-visitor v1.1.0-beta.4

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

HCL Visitor

Quick Start

npm install hcl-visitor
import { parseHCL, traverse } from "hcl-visitor";

const hcl = `
variable "region" {
  type = string
  default = "us-west-1"
}
`;

const ast = await parseHCL(hcl);
const node = ast.walk().currentNode;
traverse(node, {
  attribute: (node) => {
    console.log(node);
  },
});

Usage

  • GitHub Actions
steps:
  - name: Checkout
    uses: actions/checkout@v2
  - name: Setup Node.js
    uses: actions/setup-node@v2
    with:
      node-version: "14"
  - name: Install Dependencies
    run: npm install
  - name: Run Tests
    run: npm test

Versioning

v1.1.0

https://github.com/tree-sitter-grammars/tree-sitter-hcl

1.1.0-beta.4

10 months ago

1.1.0-beta.3

10 months ago

1.1.0-beta.2

10 months ago

1.1.0-beta.1

10 months ago

1.1.0-beta.0

10 months ago

1.1.0

10 months ago