Modularize code and other features
See original GitHub issueI would like to contribute to this project and I have some ideas to improve it.
Code enhancement:
- Modularize the codebase and use a tool like esbuild to speed up the compilation time by 10x approximately.
- Enable TypeScript strict mode and remove
anys and nullability errors.
Features:
- Generate modular JS/TS and use
// #regioncomments for automatically generated code. - Generate code for other frameworks/engines.
- Generate code for other programming languages that compile to JS.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Best Practices for Modular Application Design and Development
Modularize by Feature. In this modularization approach, developers break down code on the basis of different app features, and it creates more ......
Read more >Modular programming - Wikipedia
Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, ...
Read more >Modular programming: Definitions, benefits, and predictions
Modular programming (also referred to as modular architecture) is a general programming concept. It involves separating a program's functions ...
Read more >3 creative techniques for writing modular code | TechBeacon
A modular monolith can be a great architecture. Before you think about microservices, learn three techniques to make your code more modular.
Read more >Modular Approach in Programming - GeeksforGeeks
Modular programming is the process of subdividing a computer program into separate sub-programs. A module is a separate software component.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @drfuzzyness
In this issue, we are talking about modularizing the Phaser Editor code, but I think you are talking about modularizing the code of your games.
Please, can you open an issue about it? You can use the same comment as issue content.
Thanks!
Just wanted to add my support for modularization and thoughts for this.
ES Module support would be really helpful as some newer Phaser plugins target it such as: https://github.com/RetroVX/phaser3-juice-plugin
My existing workflow for Phaser Editor 3 is to use Gulp to manage running tasks with any JavaScript transforms applied there which works well for Typescript building to an ES5 target, though I haven’t found a good way to implement module resolution.
I primarily use Rollup in production for other web projects, but ESBuild looks straightforward. I went with Rollup for its tree shaking and robust plugin library. As long as ES modules are an option within the Phaser Editor build system and a template build system can resolve both ES modules and CommonJS (think NodeJS) modules I’d be really happy.
Protonstorm has a reference Rollup project template here: https://github.com/photonstorm/phaser3-typescript-project-template
Thanks for all your hard work on Phaser Editor!