Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide gamejs as AMD module compatible package #56

Open
oberhamsi opened this issue Nov 1, 2012 · 1 comment
Open

provide gamejs as AMD module compatible package #56

oberhamsi opened this issue Nov 1, 2012 · 1 comment

Comments

@oberhamsi
Copy link
Member

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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant