To get an output like this:
npm i --save treconst tre = require('tre')
tre([
  { 
    type: 'file', name: 'index.js' 
  },
  { 
    type: 'folder', name: 'lib', children: [
      { type: 'file', name: 'utils.js' }
    ] 
  }
])
//=> ⇣⇣⇣
.
├── index.js
└── lib 
    └── utils.jsType: Array
Default: []
An array of File/Folder.
File: { type: 'file', name: 'file name' }
Folder: { type: 'folder', name: 'folder name' }
Type: string
Default: .
The root folder name which will be shown at the top the generated file tree.
Type: boolean
Default: undefined
Whether to include dot files. Excluded by default.
- 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
 
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
