github google/jsonnet v0.8.0

latest releases: v0.20.0, v0.19.1, v0.19.0...
pre-release8 years ago

This release has a few more examples.

The main new feature is the ability to specify multiline strings more easily, i.e. instead of the ugly

{
    foo: "#!/bin/bash
echo \"Hello world!\"",
}

or the bureaucratic

{
    foo: std.lines([
        "#!/bin/bash"
        "echo \"Hello world!\"",
    ])
}

you can now do the following, which is similar to the YAML "block style" construct.

{
    foo: |||
        #!/bin/bash
        echo "Hello world!"
    |||,
}

The indentation is stripped.

Note that this is just a string literal, so it can be combined with % to do string templating:

{
    foo: |||
        #!/bin/bash
        echo "Hello %(greetable_entity)s!"
    ||| % {
        greetable_entity: "world"
    },
}

Don't miss a new jsonnet release

NewReleases is sending notifications on new releases.