0.0.1 • Published 9 years ago
tli v0.0.1
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= require('tli');
var result= tli.treeSync(__dirname);
console.log(result);
// {
// file: 2,
// directory: 3,
//
// tree: {
// baz: {
// beep: 1024,//bytes
// boop: 2048,
// },
// foo: {
// bar: {},
// },
// noop: {},
// },
// }
.stringify(tree)
-> treeString
Prettify the tree
object
var tli= require('tli');
var result= tli.treeSync(__dirname);
var tree= tli.stringify(result.tree);
console.log(tree);
//├─ baz
//│ ├─ beep
//│ └─ boop
//├─ foo
//│ └─ bar
//└─ noop
License
0.0.1
9 years ago
0.0.1-alpha.3
9 years ago
0.0.1-alpha.2
9 years ago
0.0.1-alpha.1
9 years ago
0.0.1-alpha.0
9 years ago
0.0.0
9 years ago
0.0.0-alpha.2
9 years ago
0.0.0-alpha.1
9 years ago
0.0.0-alpha.0
9 years ago