Debian Codegraph @

doc/_includes/examples/top-level-tla.jsonnet

raw
1 local lib = import 'library-tla.libsonnet';
2
3 // Here is the top-level function, note brunch
4 // now has a default value.
5 function(prefix, brunch=false) {
6
7 [prefix + 'Pina Colada']: {
8 ingredients: [
9 { kind: 'Rum', qty: 3 },
10 { kind: 'Pineapple Juice', qty: 6 },
11 { kind: 'Coconut Cream', qty: 2 },
12 { kind: 'Ice', qty: 12 },
13 ],
14 garnish: 'Pineapple slice',
15 served: 'Frozen',
16 },
17
18 [if brunch then prefix + 'Bloody Mary']: {
19 ingredients: [
20 { kind: 'Vodka', qty: 1.5 },
21 { kind: 'Tomato Juice', qty: 3 },
22 { kind: 'Lemon Juice', qty: 1.5 },
23 { kind: 'Worcestershire', qty: 0.25 },
24 { kind: 'Tobasco Sauce', qty: 0.15 },
25 ],
26 garnish: 'Celery salt & pepper',
27 served: 'Tall',
28 },
29
30 [prefix + 'Mimosa']: lib.Mimosa(brunch),
31 }