jkcfg / jk

Configuration as Code with ECMAScript
https://jkcfg.github.io
Apache License 2.0
404 stars 30 forks source link

Possible to generate a YAML comment? #359

Closed jaxxstorm closed 4 years ago

jaxxstorm commented 4 years ago

Is there a way to add a comment to the top of a file somehow?

squaremo commented 4 years ago

At present, only by serialising the value to a string (https://jkcfg.github.io/#/documentation/std-parse/stringify), and doing

std.write(comment + value, path, { format: Format.Raw });
jaxxstorm commented 4 years ago

Awesome, that got it, thanks!