@hsk766187397/get-tree
v1.0.9
Published
生成指定路径目录树
Readme
nodejs生成目录树
获取目录树
全局安装
npm i @hsk766187397/get-tree -g使用方法
Usage: get-dir-tree [dirPath] [shouldDeepTraverse] [outputPath] [ignorePatterns]
Options:
dirPath 目标目录路径,默认为当前目录。
shouldDeepTraverse 控制遍历深度,0表示全部遍历,1表示只获取当前层,其他正整数表示对应层数,默认为1。
outputPath 输出文件路径,默认不保存到文件。
ignorePatterns 过滤规则,默认过滤.git,node_modules。
-h, --help 显示帮助信息。
Examples:
get-dir-tree ./ 1 output.md
get-dir-tree ./ 2 output.md
get-dir-tree ./ 0 output.md
get-dir-tree -h (or --help) for help