1
1
mirror of https://github.com/tweag/nickel.git synced 2024-09-11 11:47:03 +03:00
nickel/examples/foreach-pattern
Pim Snel d918a7c02e
Add two examples: imports and foreach pattern (#1387)
* add install info using homebrew on macos

* Update README.md

Fix markdownlint-cli not being happy

* add two examples: imports and foreach pattern

* changes according to review suggestions

* Format new Nickel examples

* Add missing test annotations to examples

* Fix failing example annotations

* Make sure the test TOML parser doesn't choke

---------

Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@tweag.io>
Co-authored-by: Viktor Kleen <vkleen+github@17220103.de>
2023-07-06 11:47:21 +00:00
..
data_users.yml Add two examples: imports and foreach pattern (#1387) 2023-07-06 11:47:21 +00:00
foreach-pattern-on-import.ncl Add two examples: imports and foreach pattern (#1387) 2023-07-06 11:47:21 +00:00
foreach-pattern.ncl Add two examples: imports and foreach pattern (#1387) 2023-07-06 11:47:21 +00:00
README.md Add two examples: imports and foreach pattern (#1387) 2023-07-06 11:47:21 +00:00

Foreach Pattern

This example shows how a foreach pattern works in Nickel using std.array.map. A second example combines a yaml-import with the map function.

Run

nickel -f foreach-pattern.ncl export

Second example:

nickel -f foreach-pattern-on-import.ncl export