It would be nice to have a Markdown directory structure when writing the readme.md documentation for your project

Similarly, NPM already has a package called MDdir that you can use to generate directory maps for your projects

Use as follows:

Install mddir in your project (if you want to install it globally, you need to configure the environment variable mddir)
$ yarn add mddir -D
# or npm install mddir -D

# 2. Run the command to generate the structure diagram
Create a directory structure based on your needs
# node node_modules/mddir/ SRC /mddir [folder](Optional, default current directory)
$ node node_modules/mddir/src/mddir
Copy the code

After this command is executed, a directorylist. md file is generated in the current directory

As follows:

|-- Html5 |-- .babelrc |-- .gitignore |-- README.md |-- directoryList.md |-- gulpfile.js |-- package.json |-- yarn.lock |-- config | |-- env.js | |-- paths.js | |-- polyfills.js | |-- webpack.config.dev.js | |-- webpack.config.prod.js | |--  jest | |-- cssTransform.js | |-- fileTransform.js |-- public | |-- favicon.ico | |-- index.html |-- scripts | |-- build.js | |-- start.js | |-- test.js |-- src |-- App.css |-- App.js |-- App.test.js |-- index.css |-- index.js |-- logo.svg |-- api | |-- index.js |-- components | |-- hello.jsx | |-- hoc.jsx | |-- stoneForm.jsx | |-- template.jsx |-- router | |-- routes.jsx |-- store | |-- index.jsx |-- utils | |-- cookie.js | |-- module.js |-- views |-- home | |-- Home.jsx | |-- home.css |-- login | |-- Login.jsx |-- template |-- common.jsxCopy the code

See the official documentation for more details: MDDIR