diff options
Diffstat (limited to 'node_modules/cliui/README.md')
-rw-r--r-- | node_modules/cliui/README.md | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md index edcafa8ed..028392c26 100644 --- a/node_modules/cliui/README.md +++ b/node_modules/cliui/README.md @@ -1,8 +1,9 @@ # cliui -[](https://travis-ci.org/bcoe/cliui) -[](https://coveralls.io/r/bcoe/cliui?branch=) +[](https://travis-ci.org/yargs/cliui) +[](https://coveralls.io/r/yargs/cliui?branch=) [](https://www.npmjs.com/package/cliui) +[](https://github.com/conventional-changelog/standard-version) easily create complex multi-column command-line-interfaces. @@ -23,15 +24,17 @@ ui.div({ ui.div( { text: "-f, --file", - width: 40, + width: 20, padding: [0, 4, 0, 4] }, { - text: "the file to load", - width: 25 + text: "the file to load." + + chalk.green("(if this description is long it wraps).") + , + width: 20 }, { - text: "[required]", + text: chalk.red("[required]"), align: 'right' } ) @@ -39,6 +42,8 @@ ui.div( console.log(ui.toString()) ``` +<img width="500" src="screenshot.png"> + ## Layout DSL cliui exposes a simple layout DSL: @@ -48,7 +53,7 @@ object: * `\n`: characters will be interpreted as new rows. * `\t`: characters will be interpreted as new columns. -* ` `: characters will be interpreted as padding. +* `\s`: characters will be interpreted as padding. **as an example...** @@ -97,6 +102,7 @@ options: * **width:** the width of a column. * **align:** alignment, `right` or `center`. * **padding:** `[top, right, bottom, left]`. +* **border:** should a border be placed around the div? ### cliui.span(column, column, column) |