kittykatattack / ga

The world's tiniest, cutest and funnest game engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suggestion] Make ga npm-compatible

peacememories opened this issue · comments

Right now I am using ga by copying the js file into my webpack source directory. It would be nice to be able to just add it to npm dependencies. For this, of course, the structure of ga would have to change a bit, for example using exports instead of binding to window etc.

I'm also not yet sure how to best add the plugins. Probably as some sort of @ga-engine/plugin-name package collection? (This would be beneficial so that plugins can be individually required and the output file size gets smaller).

I know this would be a lot of work and I would be willing to start on a proof of concept, although maybe after js13k is done^^

I am also aware that there would still be a need to produce a .min.js version similar to the current one, for people who just want to include it in the page and start working instead of setting up a build system like webpack (although I think this would not be too hard, and I also think such setups could be made easier with yeoman templates etc.)

@peacememories My suggestion is to do this work on a fork of Ga?

Yes it seems like this would incur a lot of changes to the codebase. I've thought about what I would change and it would definitely not be the same Ga as before^^'