motion
Version:
motion - moving development forward
97 lines (96 loc) • 4.43 kB
JSON
{
"_args": [
[
"cliui@https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "cliui@>=2.1.0 <3.0.0",
"_id": "cliui@2.1.0",
"_inCache": true,
"_location": "/cliui",
"_phantomChildren": {},
"_requested": {
"name": "cliui",
"raw": "cliui@https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"rawSpec": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/uglify-js/yargs"
],
"_resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"_shasum": "4b475760ff80264c762c3a1719032e91c7fea0d1",
"_shrinkwrap": null,
"_spec": "cliui@https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"email": "ben@npmjs.com",
"name": "Ben Coe"
},
"bugs": {
"url": "https://github.com/bcoe/cliui/issues"
},
"config": {
"blanket": {
"data-cover-never": [
"node_modules",
"test"
],
"output-reporter": "spec",
"pattern": [
"index.js"
]
}
},
"dependencies": {
"center-align": "^0.1.1",
"right-align": "^0.1.1",
"wordwrap": "0.0.2"
},
"description": "easily create complex multi-column command-line-interfaces",
"devDependencies": {
"blanket": "^1.1.6",
"chai": "^2.2.0",
"coveralls": "^2.11.2",
"mocha": "^2.2.4",
"mocha-lcov-reporter": "0.0.2",
"mocoverage": "^1.0.0",
"patched-blanket": "^1.0.1",
"standard": "^3.6.1"
},
"homepage": "https://github.com/bcoe/cliui#readme",
"keywords": [
"cli",
"command-line",
"console",
"design",
"layout",
"table",
"wrap"
],
"license": "ISC",
"main": "index.js",
"name": "cliui",
"optionalDependencies": {},
"readme": "# cliui\n\n[](https://travis-ci.org/bcoe/cliui)\n[](https://coveralls.io/r/bcoe/cliui?branch=)\n[](https://www.npmjs.com/package/cliui)\n\neasily create complex multi-column command-line-interfaces.\n\n## Example\n\n```js\nvar ui = require('cliui')({\n width: 80\n})\n\nui.div('Usage: $0 [command] [options]')\n\nui.div({\n text: 'Options:',\n padding: [2, 0, 2, 0]\n})\n\nui.div(\n {\n text: \"-f, --file\",\n width: 40,\n padding: [0, 4, 0, 4]\n },\n {\n text: \"the file to load\",\n width: 25\n },\n {\n text: \"[required]\",\n align: 'right'\n }\n)\n\nconsole.log(ui.toString())\n```\n\n## Layout DSL\n\ncliui exposes a simple layout DSL:\n\nIf you create a single `ui.row`, passing a string rather than an\nobject:\n\n* `\\n`: characters will be interpreted as new rows.\n* `\\t`: characters will be interpreted as new columns.\n* ` `: characters will be interpreted as padding.\n\n**as an example...**\n\n```js\nvar ui = require('./')({\n width: 60\n})\n\nui.div(\n 'Usage: node ./bin/foo.js\\n' +\n ' <regex>\\t provide a regex\\n' +\n ' <glob>\\t provide a glob\\t [required]'\n)\n\nconsole.log(ui.toString())\n```\n\n**will output:**\n\n```shell\nUsage: node ./bin/foo.js\n <regex> provide a regex\n <glob> provide a glob [required]\n```\n\n## Methods\n\n```js\ncliui = require('cliui')\n```\n\n### cliui({width: integer})\n\nSpecify the maximum width of the UI being generated.\n\n### cliui({wrap: boolean})\n\nEnable or disable the wrapping of text in a column.\n\n### cliui.div(column, column, column)\n\nCreate a row with any number of columns, a column\ncan either be a string, or an object with the following\noptions:\n\n* **width:** the width of a column.\n* **align:** alignment, `right` or `center`.\n* **padding:** `[top, right, bottom, left]`.\n\n### cliui.span(column, column, column)\n\nSimilar to `div`, except the next row will be appended without\na new line being created.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/bcoe/cliui.git"
},
"scripts": {
"test": "standard && mocha --check-leaks --ui exports --require patched-blanket -R mocoverage"
},
"standard": {
"globals": [
"it"
],
"ignore": [
"**/example/**"
]
},
"version": "2.1.0"
}