tre
To get an output like this:
Install
npm i --save tre
Usage
const tre = //=> ⇣⇣⇣├── indexjs└── lib └── utilsjs
API
tre(files, [opts])
files
Type: Array
Default: []
An array of File/Folder.
File: { type: 'file', name: 'file name' }
Folder: { type: 'folder', name: 'folder name' }
opts
root
Type: string
Default: .
The root folder name which will be shown at the top the generated file tree.
dot
Type: boolean
Default: undefined
Whether to include dot files. Excluded by default.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
tre © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @rem_rin_rin