-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do a first non-trivial seed example, to prompt-name.
Just working this example shows a lot of places where things can be improved. Part of #36.
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
} | ||
} |