How to generate the tree path of your directory

The Tree is a cool tool to exemplify project directories, whether for tutorials, doubts, explanations for your team, etc.

Precisely because it’s a cool feature, I’ll be showing you how to easily install it on macOS and generate the directory of a Grap…


This content originally appeared on DEV Community and was authored by Danilo Assis

The Tree is a cool tool to exemplify project directories, whether for tutorials, doubts, explanations for your team, etc.

Precisely because it's a cool feature, I'll be showing you how to easily install it on macOS and generate the directory of a GraphQL API as an example.

How to Install macOS

make sure you have brew installed on your pc and run the command below:

daniloab$ brew install tree

Once installed test the command with which tree. The result should be like:

daniloab:graphql-real-world-server daniloassis$ which tree
/opt/homebrew/bin/tree

Once having Tree installed successfully, type in your terminal tree to get you directory path:

daniloab:graphql-real-world-server daniloassis$ tree
.
├── README.md
├── babel.config.js
├── package.json
├── schema.graphql
├── src
│   ├── app.ts
│   ├── config.ts
│   ├── index.ts
│   ├── modules
│   │   ├── LikeNewSubscription.ts
│   │   ├── LikeType.ts
│   │   ├── TalkType.ts
│   │   └── UserType.ts
│   ├── pubSub.ts
│   └── schema
│       ├── MutationType.ts
│       ├── QueryType.ts
│       ├── SubscriptionType.ts
│       └── schema.ts
├── tsconfig.json
├── webpack
│   └── ReloadServerPlugin.js
├── webpack.js
└── yarn.lock

4 directories, 20 files

For other ways of installing in macOS take a look at this link

https://superuser.com/questions/359723/mac-os-x-equivalent-of-the-ubuntu-tree-command

How to Install Ubuntu

through apt-get you can do the installation easily. In your terminal run:

$ sudo apt-get install tree

Installing Tree successfully star to use it to list your directories.

Automate

By being simple and fast, the tree starts to help you daily in tasks that previously could take more operational time from your routine.

Always seek to automate all those manual tasks that take up your time and don't leave you free to direct your focus to what is most important.

The repo used as example is a result from a talk of mine about GraphQL. Feel free to enjoy slides clicking here GraphQL Real World

Links:
Slides https://github.com/daniloab/graphql-real-world-server
Repo with a real GraphQL Server https://github.com/daniloab/graphql-real-world-server
References

Photo by Joel & Jasmin Førestbird on Unsplash


This content originally appeared on DEV Community and was authored by Danilo Assis


Print Share Comment Cite Upload Translate Updates
APA

Danilo Assis | Sciencx (2022-07-06T19:15:55+00:00) How to generate the tree path of your directory. Retrieved from https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/

MLA
" » How to generate the tree path of your directory." Danilo Assis | Sciencx - Wednesday July 6, 2022, https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/
HARVARD
Danilo Assis | Sciencx Wednesday July 6, 2022 » How to generate the tree path of your directory., viewed ,<https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/>
VANCOUVER
Danilo Assis | Sciencx - » How to generate the tree path of your directory. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/
CHICAGO
" » How to generate the tree path of your directory." Danilo Assis | Sciencx - Accessed . https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/
IEEE
" » How to generate the tree path of your directory." Danilo Assis | Sciencx [Online]. Available: https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/. [Accessed: ]
rf:citation
» How to generate the tree path of your directory | Danilo Assis | Sciencx | https://www.scien.cx/2022/07/06/how-to-generate-the-tree-path-of-your-directory/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.