-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial
Marceline edited this page Jul 29, 2024
·
4 revisions
Visual Studio Code is sometimes a confusing and perplexing piece of software, so I am writing this tutorial for you so that there is minimal confusion surrounding the tool luau-class-generator.
- Ensure you have installed Visual Studio Code.
- Ensure you have installed and are familiar with Rojo and Roblox Studio. Link a Rojo
project.jsonto a Roblox Studio.rbxl. - Install this extension using the Visual Studio Code Marketplace
- Inside your repository, create a file for the type outputs, with either the
.luaor.luaufile extension types. - Right click the file, and select the option
LCG: Set Types File(see fig. A) to configure this file as the "Library Types" module.
Figure A.
- Visit the configurations page (fig. B) to change the output of the luau-class-generator to your liking.
Figure B.
- Here you can configure:
- The license name to administer in each file at the top
- Luau Dynamic Fast Flags and Luau Fast Flags
- Library Name
- Library Prefix
- Comment Detail Levels
- Right click any
.luauor.luafile and select the methodLCG: New Classto create a new Luau class with fully initialized boiler plate.
NOTE: Right click any folder and select LCG: New File + Class to be prompted to enter a class name and description and the extension will also create a new file and class automatically for you.
- You may be prompted to rename the file to include the
Library Prefixat the beginning of the name of your class. It is up to you whether you wish to include this. - You will be prompted to include a general description of the class at its creation.
- Right click any file which has generated a class and select
LCG: New Methodto add a new method. You will be prompted to give your method a name and general description. It will generate boiler plate and comment descriptions (see fig. C) for you.
Figure C.
This extension was made for personal use, and is served under the terms and conditions of the GNU GPL v3.0 (General Public License).