0.1.0 • Published 9 years ago

dir.tree.js v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

dir.tree

Build Status NPM Version

Get tree object with a directory, example:

{ path: '/Users/solome/dir.tree.js/src',
  sub:
    [
      { path: '/Users/solome/dir.tree.js/src/app.js',
        sub: [] },
      { path: '/Users/solome/dir.tree.js/src/debug.js',
        sub: [] }
    ]
}

Installation

npm install -g dir.tree.js

Usage

Node

import DirTree from 'dir.tree.js'

const path = __dirname

const dirTree = DirTree(path)

Commander: list contents of directories in a tree-like format.

$ dt -s

Output demo:

.
├── dir
|   └── subdir
|       └── empty.file
└── dirtree.js

License

MIT