directory-to-tree
This is a tool that will convert a dir to tree
Last updated 2 years ago by dushao103500 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install directory-to-tree 
SYNC missed versions from official npm registry.

根据目录生成字符串树????

NPM version npm GitHub stars GitHub forks

Demo

可以根据目录生成如下所示的字符串树

directory-to-tree
├-- README.md
├-- bin
│   └-- tree.js
├-- index.js
├-- lib
│   ├-- directoryToObject.js
│   ├-- matrixToTree.js
│   └-- objectToMatrix.js
├-- node_modules
├-- package.json
└-- test
    └-- test.spec.js

安装

npm install directory-to-tree -g

使用

tree  # 会读取当前目录并生成字符串树

tree -d /home/.../[一个有效的目录路径]  # 会读取指定目录并生成字符串树

tree -depth 5[一个整数]  # 设置遍历的深度

tree -exclude /node_modules/[一个正则] # 设置忽略的目录

tree -extensions /\.txt$/[一个正则]  # 设置只想读取的文件

tree -to /home/.../[一个有效的目录路径]  # 设置字符串树生成的文件

Current Tags

  • 0.0.6                                ...           latest (2 years ago)

5 Versions

  • 0.0.6                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 3
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |