Skip to content

Instantly share code, notes, and snippets.

@emirotin
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emirotin/ee9737f846386ce7d564 to your computer and use it in GitHub Desktop.
Save emirotin/ee9737f846386ce7d564 to your computer and use it in GitHub Desktop.
exports.getPlainOptions = ->
# a helper method can be provided by the repo to flatten the options list if the CLI needs it
{
"options": [
{
"isGroup": true,
"message": "Named group",
"isCollapsible": true,
"isCollapsed": false,
"options": [ ] // an array of option definitions
},
{
"message": "An option", // an individual ungrouped option
... // the rest of the params
},
{
"isGroup": true, // anonymous group
"options": [ ]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment