I have a dir with subdirs that each contain a metadata.yaml. How can I use cue import to merge all of them into a single cue file? cue import **/metadata.yaml -p sc -l 'strings.ToLower(type)' produces one cue file per yaml file.
If we expose this as a code block, then we'd need the cue export to produce CUE on stdout, which negates /some/ of the point of the solution. We probably need to use a script block which performs the export then a cat, to properly demonstrate what's going on.
Slack thread: https://cuelang.slack.com/archives/C012UU8B72M/p1709051362031909
Question:
Solution:
If we expose this as a
code
block, then we'd need thecue export
to produce CUE on stdout, which negates /some/ of the point of the solution. We probably need to use a script block which performs the export then acat
, to properly demonstrate what's going on.Take advantage of https://github.com/cue-lang/cue/commit/93acaa356a707751467b9422c8288c9759a25560 to place the output CUE in a package.