rbxts-flamework / core

Flamework is an extensible game framework. It requires typescript and offers many useful features.
MIT License
101 stars 8 forks source link

[Custom Packages] - How to create a custom package? #113

Closed viniciusborgeis closed 1 week ago

viniciusborgeis commented 3 weeks ago

Is it possible to create a custom npm package, perhaps a local one using npm pack, and install it in my game project to modularize my systems?

Let me try to explain exactly what I want to do:

I have created a generic coin system, which is essentially a service and a controller. However, in my project, I will have multiple systems for various functionalities, and I believe separating these systems into different project libraries is a good way to keep the final project clean. But I'm not sure how to do this. Is it necessary to merge ClientToServerFunctions, ServerToClientEvents, ClientToServerEvents, and ServerToClientFunctions to expose my service API? Do I need to create an entire project template to build this simple package?

I would appreciate it if someone could show me a basic example of how to set all this up. Thank you!

Fireboltofdeath commented 1 week ago

Closed in favor of your help thread in roblox-ts