christopher-buss / roblox-ts-project-template

My personalized template for starting roblox-ts projects.
MIT License
21 stars 1 forks source link


roblox-ts template

A roblox-ts template for fully managed rojo projects.

[![Production](https://img.shields.io/badge/production-000000?style=for-the-badge&logo=roblox&logoColor=d9e0ee)](https://www.roblox.com/games/17834656300) [![Development](https://img.shields.io/badge/development-blue?style=for-the-badge&logo=robloxstudio&logoColor=d9e0ee)](https://www.roblox.com/games/17613681043) [![Get Support](https://img.shields.io/badge/support-ffffff?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNjMiIGhlaWdodD0iMjYzIiBmaWxsPSJub25lIj4KCTxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTUgLTIxMikgcm90YXRlKDE1IDQ1MSAyMTMpIj4KCQk8cmVjdCB4PSI0NTEiIHk9IjIxMyIgd2lkdGg9IjIxMyIgaGVpZ2h0PSIyMTMiIHJ4PSIwIiBmaWxsPSIjRTIyNDFBIi8+CgkJPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01ODAuODM3IDM4MS43MTNWNDAzLjE5OEM1ODQuMzMyIDQwNC45ODkgNTg4LjQ2NCA0MDYuMzMyIDU5My4yMzUgNDA3LjIyN0M1OTguMDA2IDQwOC4xMjIgNjAzLjAzNCA0MDguNTcgNjA4LjMyIDQwOC41N0M2MTMuNDcyIDQwOC41NyA2MTguMzY2IDQwOC4wNzcgNjIzLjAwMyA0MDcuMDkyQzYyNy42MzkgNDA2LjEwOCA2MzEuNzA0IDQwNC40ODUgNjM1LjE5OSA0MDIuMjI1QzYzOC42OTMgMzk5Ljk2NCA2NDEuNDU5IDM5Ny4wMSA2NDMuNDk3IDM5My4zNjJDNjQ1LjUzNSAzODkuNzE0IDY0Ni41NTUgMzg1LjIwNSA2NDYuNTU1IDM3OS44MzNDNjQ2LjU1NSAzNz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gNTgwLjgzNyAzODEuNzEzWk01NDUuMDI2IDMyOC4yNDZINTcyLjY1NVYzMTAuNTU2SDQ5NS42NDVWMzI4LjI0Nkg1MjMuMTM5VjQwNy4wMTRINTQ1LjAyNlYzMjguMjQ2WiIgZmlsbD0id2hpdGUiLz4KCTwvZz4KPC9zdmc+Cg==)](https://discord.com/invite/JFvZY5JSBT)

[!CAUTION] You likely do not need a fully managed rojo project. For the vast majority of projects, a more simple setup will suffice. If you are new to roblox-ts, I would strongly advise against using the vast majority of the tooling in this project. Instead, I would recommend starting with a more simple setup such as the default flamework template, or the roblox-ts-template by MonzterDev.

This is my personal template for use in the roblox-ts ecosystem, utilizing popular libraries and tools such as Flamework, React, and Reflex. For a comprehensive list of packages, refer to the package.json file.

The primary objective of this project is to provide a streamlined approach for initiating new projects, complete with frequently used patterns that I adopt already configured. Additionally, it integrates my own customized eslint-config, which is a highly opinionated guide for writing clean and consistent code.

[!NOTE] This aims to be a fully-fledged solution to fully managed rojo projects but does not currently have any built-in support for handing models. Eventually this functionality will exist. For now, you can investigate Lune to figure out solutions that will work for your use case.

How to use:

  1. Press the green Use this template button on the top right of the page to create a new repository.
  2. Clone the repository to your local machine.
  3. Run pnpm install to install all the dependencies.
  4. Run pnpm run dev:start to start the development server.
  5. Start coding! 🎉

Resources

The following is a list of primary resources that are used in this project (in alphabetical order):

Packages

Roblox Tools

Development Tools

Guide

The following is a guide to the tools of the project and how to typically use them.

Developing

While in development, I would typically use the pnpm run dev:start command to compile the project and start the development server. This will compile the code, build the project, and then automatically open the place file in Roblox Studio.

To publish the project, I would use the pnpm run prod:build command to build the game project with the production configuration. This will delete your current out folder, replace it with the new build, and then automatically runs darklua on the project (outputting the game project to the dist folder). This allows us to completely remove any development only code, such that it does not exist in the final game project. This process is currently automated when you merge a pull request into the main branch.

Tip

All of the commands can be found in the package.json file under the scripts section. These can be accessed in VSCode through the NPM SCRIPTS tab in the sidebar, where you can run them by clicking the play button next to the command.

Contributing

As this is a personal template, I am not typically seeking contributions. However, if you discover any bugs, feel free to create a pull request or an issue, and I will address it. If you wish to suggest a feature or improvement, please submit an issue first to initiate discussion!

Credits 🙏

Some of the code in this template has been taken from others and modified for my usage, and I would like to give credit to the following people and projects: