folder-to-tree
v0.0.4
Published
a folder to json npm module built with typescript
Downloads
6
Readme
folder-to-tree
print your folder to tree structure
Install
$ npm i folder-to-tree --save
# command line usage
$ npm i folder-to-tree -g
$ folder2tree
a folder to tree npm module built with typescript
Usage
export interface IFolder2TreeOptions {
isIgnoreHiddenFolderOrFile: boolean; // default true
ignoreFilePattern: RegExp; // deault to /node_modules/
reachLeafNodeCallback: (leafPath: string) => string; // default to str=>str,renders leafNode string
}
import { folderToTree } from 'folder-to-tree';
const json = folderToTree(dirName, options); // gets foler structure to json