Open oberhamsi opened 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
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.