Skip to content

Commit

Permalink
Do a first non-trivial seed example, to prompt-name.
Browse files Browse the repository at this point in the history
Just working this example shows a lot of places where things can be improved.

Part of #36.
  • Loading branch information
jkomoros committed Jul 4, 2023
1 parent 19c5e7b commit 7d029f1
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions seeds/example-complex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"version": 0,
"seeds": {
"prompt-name": {
"type": "let",
"name": "komoroske.com:user_first_name",
"value": {
"type": "retrieve",
"key": "user_first_name"
},
"block": {
"type": "if",
"test": {
"type": "==",
"a": {
"type": "var",
"name": "komoroske.com:user_first_name"
},
"b": null
},
"then": {
"type": "let",
"name": "komoroske.com:user_first_name",
"value": {
"type": "input",
"question": "What name should I call you?",
"default": "Bob"
},
"block": {
"type": "array",
"items": [
{
"type": "log",
"value": {
"type": "render",
"template": "OK, I'll call you {{name}}",
"vars": {
"type": "object",
"properties": {
"name": {
"type": "var",
"name": "komoroske.com:user_first_name"
}
}
}
}
},
{
"type": "store",
"key": "user_first_name",
"value": {
"type": "var",
"name": "komoroske.com:user_first_name"
}
}
]
}
},
"else": {
"type": "var",
"name": "komoroske.com:user_first_name"
}
}
}
}
}

0 comments on commit 7d029f1

Please sign in to comment.