Skip to content

Commit

Permalink
📝
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Jun 2, 2015
1 parent ef68717 commit 3d8390e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@

> Tree command emulator
# CLI

## Installation
```bash
$ 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
```

# CLI
## Try

```bash
$ tli
.
Expand All @@ -28,25 +41,12 @@ $ tli
│ └─ guwa-
└─ index.coffee

8 directories, 6 files
```

## Options
```bash
$ 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
10 directories, 10 files
```

# API
```bash
$ npm install tli
$ npm install tli --save
```

## `.treeSync(path)` -> `{file,directory,tree}`
Expand Down Expand Up @@ -83,6 +83,7 @@ Prettify the `tree` object
var tli= require('tli');
var result= tli.treeSync(__dirname);
var tree= tli.stringify(result.tree);

console.log(tree);
//├─ baz
//│ ├─ beep
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tli",
"bin" : "tli",
"version": "0.0.0-alpha.1",
"version": "0.0.0-alpha.2",
"description": "Tree command emulator",

"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class Tli extends Command
else
console.log (path.relative process.cwd(),cwd) or '.'
console.log @stringify(result.tree).join('\n')+'\n'

if @summary
console.log '%s directories, %s files',result.directory,result.file

treeSync: (cwd,options={})->
Expand Down

0 comments on commit 3d8390e

Please sign in to comment.