aboutsummaryrefslogtreecommitdiff
path: root/node_modules/cliui/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-27 17:36:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-27 17:36:13 +0200
commit5f466137ad6ac596600e3ff53c9b786815398445 (patch)
treef914c221874f0b16bf3def7ac01d59d1a99a3b0b /node_modules/cliui/README.md
parentc9f5ac8e763eda19aa0564179300cfff76785435 (diff)
node_modules, clean up package.json
Diffstat (limited to 'node_modules/cliui/README.md')
-rw-r--r--node_modules/cliui/README.md20
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
-[![Build Status](https://travis-ci.org/bcoe/cliui.png)](https://travis-ci.org/bcoe/cliui)
-[![Coverage Status](https://coveralls.io/repos/bcoe/cliui/badge.svg?branch=)](https://coveralls.io/r/bcoe/cliui?branch=)
+[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui)
+[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=)
[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui)
+[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](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)