Skip to content

slashhuang/folder-to-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 to true
        ignoreFilePattern: RegExp; // default to /node_modules/
        reachLeafNodeCallback: (leafPath: string) => string; // default to render leafNode absolute file path
    }
    import { folderToTree } from 'folder-to-tree';
    const json = folderToTree(dirName, options); // reads folder structure into json

About

print your folder to tree structure

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published