-
Notifications
You must be signed in to change notification settings - Fork 321
Description
Is your feature request related to a problem? Please describe.
Sometimes 3rd party systems require annotating configurations via comments.
For example, cloud-init requires that its yaml files have a she-bang line like this:
#cloud-config
<some yaml stuff>
......
See here https://cloudinit.readthedocs.io/en/latest/topics/examples.html for more examples.
Describe the solution you'd like
File test.cue
//cloud-config
foo: "bar"
hello: {
// occupy
world: "from mars?"
}
when exported via command cue export --out yaml --preserve-comments test.cue
should produce something like this:
# cloud-config
foo: bar
hello:
# occupy
world: from mars?
Describe alternatives you've considered
There is an easy workaround when wrapping cue-cmd via bash script. It's suboptimal but it's not a blocker.
Additional context
Bonus point: Some comments may be relevant to cue language itself thus we do not really want to export them.
It could be nice to have a convention to export whitelisted comments. For example, only comments starting from ///
will be exported.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status