Tli
Tree command emulator
CLI
Installation
$ npm install tli --global$ tli -V# 0.0.0 $ tli --help# # Usage: tli /path/to/dir # # Options: # # -h, --help output usage information # -L --level <level> Descend only level directories deep. # -j --json Output json
Try
$ tli.├─ cli.spec.coffee├─ fixtures│ ├─ foo│ │ ├─ bar│ │ │ └─ beep│ │ └─ baz│ └─ hoge│ ├─ fuga│ ├─ ninja│ │ └─ nande│ │ └─ aieeee│ └─ piyo│ └─ guwa-└─ index.coffee 10 directories, 10 files
API
$ npm install tli --save
.treeSync(path)
-> {file,directory,tree}
File and directory synchronous searching.
var tli= ; var result= tli;console;// {// file: 2,// directory: 3,//// tree: {// baz: {// beep: 1024,//bytes// boop: 2048,// },// foo: {// bar: {},// },// noop: {},// },// }
.stringify(tree)
-> treeString
Prettify the tree
object
var tli= ;var result= tli;var tree= tli; console;//├─ baz//│ ├─ beep//│ └─ boop//├─ foo//│ └─ bar//└─ noop