question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Modularize code and other features

See original GitHub issue

I 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 // #region comments for automatically generated code.
  • Generate code for other frameworks/engines.
  • Generate code for other programming languages that compile to JS.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
PhaserEditor2Dcommented, Nov 1, 2020

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!

0reactions
drfuzzynesscommented, Nov 1, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found