GameJs / gamejs

GameJs is a thin library on top of the HTML canvas element. In addition to the drawing functions it has a set of generally helpful modules for game development.
http://gamejs.org
MIT License
466 stars 107 forks source link

provide gamejs as AMD module compatible package #56

Open oberhamsi opened 11 years ago

oberhamsi commented 11 years ago

we already have a build step, so providing it as something usable with requirejs shouldn't be too hard.

there's even a converter script for cjs->AMD shipping with requirejs.

the best idea would probably be to produce one gamejs.min.js, which is plain commonjs and one gamejs.min.amd.js, which can be loaded by AMD loaders.

oberhamsi commented 11 years ago

I was told that the converter is not good enough because we have circular dependencies so some amount of manual wrapping is required.

Another option could be loading gamejs with "shim" config of requirejs, which is just a way to import modules with globals http://requirejs.org/docs/api.html#config-shim