pretty-file-tree

1.0.1 • Public • Published

pretty-file-tree

Build Status

A tiny, simple utility for pretty-printing lists of file paths as a tree for command-line-interfaces.

Example

const prettyTree = require('pretty-file-tree');
 
console.log(prettyTree([
    'home/user/foo.js',
    'home/user/test/bar.js',
    'home/user/test/baz.js',
    'home/user/bat.js'
]));

Result

home/user
├── foo.js
├── test
|  ├── bar.js
|  └── baz.js
└── bat.js

Package Sidebar

Install

npm i pretty-file-tree

Weekly Downloads

67

Version

1.0.1

License

MIT

Unpacked Size

13 kB

Total Files

6

Last publish

Collaborators

  • codysmithd