Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hotdogc1017/tree-node-cli

hotdogc101721MIT1.0.2TypeScript support: included

Lists the contents of directories in a tree-like format, similar to the Linux tree command.

tree, cli, node-tree, command, file, directory

readme

tree-node-cli

安装

作为一次性命令工具

npx @hotdogc1017/tree-node-cli@latest

作为开发依赖

npm add -D @hotdogc1017/tree-node-cli

使用

拓展了原有的tree-node-cli,支持以下选项:

  • --allow-gitignore(node中为allowGitignore):忽略.gitignore文件规则,显示所有文件。默认为false

其他使用方式和配置请参考源仓库的README

说明

包含以下改动:

  • 不再支持获取文件夹大小:fast-folder-size依赖不支持ESM。因此移除了fast-folder-size依赖。
  • 遵守.gitignore文件规则:默认排除.gitignore文件中忽略的文件。但可以通过指定选项来忽略此规则:在node中传入allowGitignore选项;在CLI中传入--allow-gitignore选项。

感谢

Thanks to yangshun