LinusU / gopher-hcl

The official HCL library, compiled to JavaScript with GopherJS
10 stars 4 forks source link

Works in a browser too? #3

Closed paul-hammant closed 6 years ago

paul-hammant commented 6 years ago

I ask as the code example is for NodeJs

LinusU commented 6 years ago

It should work with Browserify, WebPack, or Rollup 👍

I think adding UMD or similar files is the wrong approach, so would prefer not doing that...

paul-hammant commented 6 years ago

Well I'm really after the ability to GET and PUT a text resource from/to the server. I'm wanting a CR-delimited text format that's less noisy with diffs than JSON is (the client-side Vue.js app that I have now works perfectly with JSON except for diff noise in document history).

TOML was a choice, I thought. But it was stymied by the way it saves multi-line arrays. See https://github.com/uiri/toml/issues/91. However, I've missed that the devs for that were busy referencing the issue in a series of commits, so I should investigate again.

Not sure if you're going to see this or not, as you've closed the issue. Thanks for responding anyway.

LinusU commented 6 years ago

Maybe your diffs could be expressed with JSON Patch?