haskell-jsonnet icon indicating copy to clipboard operation
haskell-jsonnet copied to clipboard

Multiple file output

Open moleike opened this issue 4 years ago • 0 comments

Add a mode for generating multiple JSON files from a single Jsonnet file

// multiple_output.jsonnet
{
  "a.json": {
    x: 1,
    y: $["b.json"].y,
  },
  "b.json": {
    x: $["a.json"].x,
    y: 2,
  },
}
$ jsonnet -m . multiple_output.jsonnet
a.json
b.json
$ cat a.json 
{
   "x": 1,
   "y": 2
}
$ cat b.json 
{
   "x": 1,
   "y": 2
}

Details here: https://jsonnet.org/learning/getting_started.html#multi

moleike avatar May 26 '21 08:05 moleike