From 554119b0af09cb33aea4e709c0572043cd00586d Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 29 Sep 2017 12:18:46 +0700 Subject: [PATCH] Document #63 --- readme.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/readme.md b/readme.md index e8dcbb2..d0da906 100644 --- a/readme.md +++ b/readme.md @@ -82,6 +82,31 @@ Type: `Object` `Array` `string` Can either be a string/array that is the `help` or an options object. +##### flags + +Type: `Object` + +Define argument flags. + +The key is the flag name and the value is an object with any of: + +- `type`: Type of value. (Possible values: `string` `boolean`) +- `alias`: Usually used to define a short flag alias. +- `default`: Default value when the flag is not specified. + +Example: + +```js +flags: { + unicorn: { + type: 'string', + alias: 'u', + default: 'rainbow' + } +} +``` + + ##### description Type: `string` `boolean`