diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-10-17 08:37:10 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-10-17 08:37:10 +0400 |
commit | 7610f3e62e699292ece081bfd33084d436e3246d (patch) | |
tree | 4414c0058845d117b45cf30a2cf5b8311b009468 /node_modules/archy | |
parent | 9c1314985e513e20ffa3ea0ca333ba2ab78299c9 (diff) |
archy@1.0.0
Diffstat (limited to 'node_modules/archy')
-rw-r--r-- | node_modules/archy/LICENSE | 18 | ||||
-rw-r--r-- | node_modules/archy/README.markdown | 22 | ||||
-rw-r--r-- | node_modules/archy/examples/beep.js | 24 | ||||
-rw-r--r-- | node_modules/archy/examples/multi_line.js | 25 | ||||
-rw-r--r-- | node_modules/archy/package.json | 77 | ||||
-rw-r--r-- | node_modules/archy/test/beep.js | 40 | ||||
-rw-r--r-- | node_modules/archy/test/multi_line.js | 45 | ||||
-rw-r--r-- | node_modules/archy/test/non_unicode.js | 40 |
8 files changed, 253 insertions, 38 deletions
diff --git a/node_modules/archy/LICENSE b/node_modules/archy/LICENSE new file mode 100644 index 000000000..ee27ba4b4 --- /dev/null +++ b/node_modules/archy/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/archy/README.markdown b/node_modules/archy/README.markdown index deaba0fd1..ef7a5cf34 100644 --- a/node_modules/archy/README.markdown +++ b/node_modules/archy/README.markdown @@ -1,12 +1,12 @@ -archy -===== +# archy Render nested hierarchies `npm ls` style with unicode pipes. +[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) + [![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) -example -======= +# example ``` js var archy = require('archy'); @@ -50,13 +50,11 @@ beep time! ``` -methods -======= +# methods var archy = require('archy') -archy(obj, prefix='', opts={}) ------------------------------- +## archy(obj, prefix='', opts={}) Return a string representation of `obj` with unicode pipe characters like how `npm ls` looks. @@ -77,8 +75,7 @@ with the current prefix. To disable unicode results in favor of all-ansi output set `opts.unicode` to `false`. -install -======= +# install With [npm](http://npmjs.org) do: @@ -86,7 +83,6 @@ With [npm](http://npmjs.org) do: npm install archy ``` -license -======= +# license -MIT/X11 +MIT diff --git a/node_modules/archy/examples/beep.js b/node_modules/archy/examples/beep.js new file mode 100644 index 000000000..9c0704797 --- /dev/null +++ b/node_modules/archy/examples/beep.js @@ -0,0 +1,24 @@ +var archy = require('../'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/node_modules/archy/examples/multi_line.js b/node_modules/archy/examples/multi_line.js new file mode 100644 index 000000000..8afdfada9 --- /dev/null +++ b/node_modules/archy/examples/multi_line.js @@ -0,0 +1,25 @@ +var archy = require('../'); + +var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/node_modules/archy/package.json b/node_modules/archy/package.json index 81c3e2669..4b3da6637 100644 --- a/node_modules/archy/package.json +++ b/node_modules/archy/package.json @@ -1,22 +1,42 @@ { "name": "archy", - "version": "0.0.2", + "version": "1.0.0", "description": "render nested hierarchies `npm ls` style with unicode pipes", "main": "index.js", - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, "devDependencies": { - "tap": "~0.2.3" + "tap": "~0.3.3", + "tape": "~0.1.1" }, "scripts": { "test": "tap test" }, + "testling": { + "files": "test/*.js", + "browsers": { + "iexplore": [ + "6.0", + "7.0", + "8.0", + "9.0" + ], + "chrome": [ + "20.0" + ], + "firefox": [ + "10.0", + "15.0" + ], + "safari": [ + "5.1" + ], + "opera": [ + "12.0" + ] + } + }, "repository": { "type": "git", - "url": "git://github.com/substack/node-archy.git" + "url": "http://github.com/substack/node-archy.git" }, "keywords": [ "hierarchy", @@ -30,23 +50,30 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" + "license": "MIT", + "gitHead": "30223c16191e877bf027b15b12daf077b9b55b84", + "bugs": { + "url": "https://github.com/substack/node-archy/issues" }, + "homepage": "https://github.com/substack/node-archy", + "_id": "archy@1.0.0", + "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "_from": "archy@>=1.0.0 <2.0.0", + "_npmVersion": "1.4.25", "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_id": "archy@0.0.2", - "dependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "_engineSupported": true, - "_npmVersion": "1.1.13", - "_nodeVersion": "v0.7.7-pre", - "_defaultsLoaded": true, - "_from": "archy@0.0.2" + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "dist": { + "shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "tarball": "http://registry.npmjs.org/archy/-/archy-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" } diff --git a/node_modules/archy/test/beep.js b/node_modules/archy/test/beep.js new file mode 100644 index 000000000..4ea74f9ce --- /dev/null +++ b/node_modules/archy/test/beep.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ └── human', + ' └── party!', + '' + ].join('\n')); + t.end(); +}); diff --git a/node_modules/archy/test/multi_line.js b/node_modules/archy/test/multi_line.js new file mode 100644 index 000000000..2cf2154d8 --- /dev/null +++ b/node_modules/archy/test/multi_line.js @@ -0,0 +1,45 @@ +var test = require('tape'); +var archy = require('../'); + +test('multi-line', function (t) { + var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '│ one', + '│ two', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ │ wheee', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ │ meat', + ' │ └── creature', + ' └── party', + ' time!', + '' + ].join('\n')); + t.end(); +}); diff --git a/node_modules/archy/test/non_unicode.js b/node_modules/archy/test/non_unicode.js new file mode 100644 index 000000000..7204d3327 --- /dev/null +++ b/node_modules/archy/test/non_unicode.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }, '', { unicode : false }); + t.equal(s, [ + 'beep', + '+-- ity', + '`-- boop', + ' +-- o_O', + ' | +-- oh', + ' | | +-- hello', + ' | | `-- puny', + ' | `-- human', + ' `-- party!', + '' + ].join('\n')); + t.end(); +}); |