npm

js-hcl-parser

1.0.1 • Public • Published

js-hcl-parser

Overview

This package is used to generate Javascript parser for HCL (HashiCorp Configuration Language) from official repository https://github.com/hashicorp/hcl

Installing

$ npm install js-hcl-parser

Usage

See complete example under examples

var HCL = require("js-hcl-parser")
 
const hclInput = `
scale {
  from = 72
  to = 24
}
`
 
const jsonInput = `
{
  "scale": {
    "from": 72,
    "to": 72
  }
}
`
 
console.log(HCL.parse(hclInput))
 
console.log(HCL.stringify(jsonInput))

Building

$ go get -u github.com/hashicorp/hcl
$ go get -u github.com/gopherjs/gopherjs
$ gopherjs build . -o dist/hcl.js -m

Testing

$ go test ./test
$ npm test

Contributing

I ❤️ Open source!

Follow github guides for forking a project

Follow github guides for contributing open source

Squash pull request into a single commit

License

js-hcl-parser is released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i js-hcl-parser

Weekly Downloads

12,113

Version

1.0.1

License

MIT

Unpacked Size

1.59 MB

Total Files

13

Last publish

Collaborators

  • vgsantoniazzi