https://github.com/artiely/treeplus
快速生成项目结构图
https://github.com/artiely/treeplus
directory file folder nodejs nodejs-modules structure tree
Last synced: 9 months ago
JSON representation
快速生成项目结构图
- Host: GitHub
- URL: https://github.com/artiely/treeplus
- Owner: artiely
- Created: 2018-03-12T01:34:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-30T08:46:19.000Z (almost 5 years ago)
- Last Synced: 2024-09-24T18:36:16.844Z (over 1 year ago)
- Topics: directory, file, folder, nodejs, nodejs-modules, structure, tree
- Language: JavaScript
- Size: 13.7 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> treeplus is a node module for creating and manipulating hierarchical tree structures.
> 很多时候我们在输出项目结构, 但是我们需要排除一些文件或者只需要文件夹结构,treeplus 就很好的实现了这些。
# Install
```bash
$ npm install treeplus -g
```
# Usage
```bash
$ [tp|treeplus]
# or
$ [tp|treeplus] --help 查看帮助
```
# example
```bash
$ tp -i node_modules
# 指定参数,排除单个目录
# Returns
├──bin
│ └──treeplus.js
├──package-lock.json
├──package.json
└──README.md
```
```bash
# 指定参数,排除多个目录
$ tp -i node_modules bin
# Returns
├──package-lock.json
├──package.json
└──README.md
```
```bash
# 指定参数,只打印文件夹
$ tp -d
# Returns
├──bin
```
```bash
# 指定参数,打印指定的层级,参数大于0
$ tp -l 1
# Returns
├──bin
```
```bash
# 多参数结合使用
$ tp -d -l 2 -i node_modules
# Returns
├──bin
```
```bash
$ tp
# Returns
├──bin
│ └──treeplus.js
├──node_modules
│ ├──.bin
│ │ ├──index.js
│ │ ├──LICENSE
│ │ ├──package.json
│ │ ├──README.md
│ │ └──yargs.js
│ ├──yargs-parser
│ │ ├──lib
│ │ │ └──tokenize-arg-string.js
│ │ ├──CHANGELOG.md
│ │ ├──index.js
│ │ ├──LICENSE.txt
│ │ ├──package.json
│ │ └──README.md
├──package-lock.json
├──package.json
└──README.md
```