The directory structure generated by the front-end README.md, the detailed steps are as follows?

The content of README.md is a file that should exist for each project in the development project. The purpose of creating README.md is to briefly describe the project information, so that others can quickly understand the general situation of the project.

1. Install tree globally

npm install treer -g

insert image description here
2.cmd to the project

treer -d 项目名 -e treer.md -i "/node_modules|.git/"

insert image description here
Check the version number:

treer -V

treeer.md:
is a generated folder: open the folder to see the generated directory tree.
insert image description here
treeer.md directory tree

toimc-api
├─.babelrc
├─.dockerignore
├─.eslintrc.js
├─.prettierrc
├─docker-compose.api.yml
├─docker-compose.yml
├─Dockerfile
├─jsconfig.json
├─package-lock.json
├─package.json
├─README.md
├─yarn.lock
├─src
|  ├─index.js
|  ├─routes
|  |   ├─routes.js
|  |   ├─modules
|  |   |    ├─adminRouter.js
|  |   |    ├─commentsRouter.js
|  |   |    ├─contentRouter.js
|  |   |    ├─loginRouter.js
|  |   |    ├─publicRouter.js
|  |   |    ├─userRouter.js
|  |   |    └wxRouter.js
|  ├─model
|  |   ├─Comments.js
|  |   ├─CommentsHands.js
|  |   ├─CommentsUsers.js
|  |   ├─ErrorRecord.js
|  |   ├─Links.js
|  |   ├─Menus.js
|  |   ├─Post.js
|  |   ├─PostHistory.js
|  |   ├─PostTags.js
|  |   ├─Roles.js
|  |   ├─SignRecord.js
|  |   ├─User.js
|  |   ├─UserCollect.js
|  |   └WxDevice.js
|  ├─config
|  |   ├─DBHelpler.js
|  |   ├─HwConfig.js
|  |   ├─index.js
|  |   ├─Log4j.js
|  |   ├─MailConfig.js
|  |   ├─RedisConfig.js
|  |   ├─WebSocket.js
|  |   └WxConfig.js
|  ├─common
|  |   ├─Auth.js
|  |   ├─Cron.js
|  |   ├─ErrorHandle.js
|  |   ├─HwUtils.js
|  |   ├─Init.js
|  |   ├─Logger.js
|  |   ├─Phone.js
|  |   ├─Utils.js
|  |   ├─WxAlgorithm.js
|  |   ├─WXBizDataCrypt.js
|  |   ├─WxPostCheck.js
|  |   └WxUtils.js
|  ├─api
|  |  ├─AdminController.js
|  |  ├─CommentsController.js
|  |  ├─ContentController.js
|  |  ├─ErrorController.js
|  |  ├─LoginController.js
|  |  ├─PublicController.js
|  |  ├─StatisticsController.js
|  |  └UserController.js
├─logs
|  ├─access.log
|  ├─app.log
|  └error.log
├─dist
|  └server.bundle.js
├─config
|   ├─utils.js
|   ├─webpack.config.base.js
|   ├─webpack.config.dev.js
|   └webpack.config.prod.js
├─.vscode
|    ├─launch.json
|    └tasks.json

According to the required tree structure, copy the directory tree text to README.md,
find the file and open it, copy it to the README.md document and add ``````
insert image description here

Folder command:
Ignore a file: tree -I "node_modules"
// Can be used with -d and -i.

// Requirement: Generate the directory structure tree of the vue folder and ignore node_modules and .git, and finally import the generated directory structure tree into the tree.md file.

treer -d 指定目录
// 如果不指定目录,则会将当前目录作为指定目录

Parameter Description:

-a 显示所有文件和目录。

-A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。

-C 在文件和目录清单加上色彩,便于区分各种类型。

-d 显示目录名称而非内容。

-D 列出文件或目录的更改时间。

-f 在每个文件或目录之前,显示完整的相对路径名称。

-F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","=","@","|"号。

-g 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。

-i 不以阶梯状列出文件或目录名称。

-L level 限制目录显示层级。

-l 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。

-n 不在文件和目录清单加上色彩。

-N 直接列出文件和目录名称,包括控制字符。

-p 列出权限标示。

-P<范本样式> 只显示符合范本样式的文件或目录名称。

-q 用"?"号取代控制字符,列出文件和目录名称。

-s 列出文件或目录大小。

-t 用文件和目录的更改时间排序。

-u 列出文件或目录的拥有者名称,没有对应的名称时,则显示用户识别码。

-x 将范围局限在现行的文件系统中,若指定目录下的某些子目录,其存放于另一个文件系统上,则将该子目录予以排除在寻找范围外。

Ignore the specified directory
Sometimes we need to ignore some file names, such as our node_modules folder:

$ treer -i <"文件名,支持正则表达式/regex/哦">

Used to filter files or folders that do not want to be displayed. For example, to filter the node_modules folder in the project;

 tree -I node_modules

Guess you like

Origin blog.csdn.net/weixin_46409887/article/details/128079643