SuzukaDev / vscode-godot-project-breakdown

A Visual Studio Code extension that generates a file with some project/scripts information of your Godot project. Useful for helping mantaining the documentation of a project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Godot Project Breakdown 🤖📑

Overview 🔍

This is an vscode extension that gets all .gd files in your project (works only with .gd), analyze them and gives a overview of all of them in a single file.

For each .gd file, it shows its private or public* variables and methods, defined signals, node references and enums.

* Private and public fields do not exist (at least at the moment) in gd script, but if you use the prefix "_" to differentiate private fields (using "_") from public (without "_"), it will take it into account.

But... Why? For what? 🐕

I made this extension for myself, to easily track and update every change in my project, so I could easily manage/update my project documentation (in my case, an UML diagram for my game). Instead of keeping track of every change manually, I just generate a new file, compare it to the previous version (using version control), and effectively update my documentation.

I released the extension just in case is helpful for somebody else. 🍀

Usage 🔧

Prerequisites: this extension requires Godot tools

  1. Download latest version and install it

‼️If you are using a Godot Tools version below 1.X.X, download version 1.0.1
If you are using Godot 3.2 or above and a Godot tools version equal or above 1.X.X download latest version

  1. To install the .vsix files, go to extensions -> ... -> "Install from vsix"
  2. Open command palette (F1)
  3. Type Generate breakdown file
  4. Execute command
  5. Enjoy 💃 (optional)

Extension options 📝

The result file is highly customizable to suit your needs. You can specify wich data to show, in wich order, and how.

Most options are self explanatory with its setting's description. But some of them:

godotProjectBreakdown.file.order

This is one of the most important settings. Is a string that specifies the data to show and the order. Its default value is f# p ne svm

Each character stands for a data in file: n - Node references
s - Signals
v - Variables
m - Methods
p - Path of the file
f - File Name
e - Enums
# - Class Comments. On any gdscript, you can put the text you want to show in the file if you include it between ###\ and /###. For example: ###\ (Yor comment here) /###
(Empty space) - Line separation (equals to \n)

godotProjectBreakdown.file.sortScriptsBy

Allows you to sort the scripts by their path, name or extended node/script.

godotProjectBreakdown.separator.{...}

A string that allows you to add a custom header for each property.

godotProjectBreakdown.prefix.{...}

Allows you to add a custom prefix for each property.

godotProjectBreakdown.file.ignoreFolders

A Glob Pattern for ignoring folders/files that you don't want to show in the breakdown file.

Its default value is "**/addons/**", wich means that will ignore files on anny "addons" folder.

If Glob Patterns are new to you, this tool is very useful to ensure your glob pattern is correct 🐶

godotProjectBreakdown.file.showEnumValues

A bool for showing (true) or not (false) the enum values for each enum.

Possible future improvements 💥

  • Analyze all the .tscn files in the project for getting more information, like... signals connected via editor.

  • Maybe I'll upload the extension into the vscode marketplace in the future.

FAQ ❓

Why the name of the extension is that bad?

Because I couldn't think of a better name :D

Logo license ©️

The extension logo uses and modifies the original Godot logo by Andrea Calabró.

Its License: Godot Logo (C) Andrea Calabró Distributed under the terms of the Creative Commons Attribution License version 3.0 (CC-BY 3.0) https://creativecommons.org/licenses/by/3.0/legalcode.

Contact 🐶

@SuzukaDev 🐺

About

A Visual Studio Code extension that generates a file with some project/scripts information of your Godot project. Useful for helping mantaining the documentation of a project.

License:MIT License


Languages

Language:TypeScript 100.0%