-
Notifications
You must be signed in to change notification settings - Fork 34
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
QueryEngine not RequireJS compatible #18
Comments
Thanks for this. We'll need to come up with a different approach as QueryEngine is also made to run on the desktop side with Node.js, so window, document and navigator won't always be available. Any ideas on something that supports AMD, No-AMD and Node? |
Hello, I borrowed the code from knockout.js, you can see the original sample here also had a condition for node/common.js modules: I simply removed the node.js branch thinking it wasn't necessary. Also, instead of passing Hth, |
I'd love to support this. From experience however, maintaining compatibility with multiple module loaders is a real nightmare. To use Query-Engine with Require/AMD/UMD, the build tools browserify and webpack have options to provide the necessary wrappers that you should need. It should also be fairly easy to accomplish this manually right? Having this officially provided, also means that it has to be officially supported, which I simply cannot guarantee. |
Will be address by #43 |
Hello,
When using the 'AMD' versions of Underscore and Backbone libraries, QueryEngine fails to load the proper dependencies using
require("backbone")
, etc.As per this discussion
require
sync version needs to be used within arequire
ordefine
callback, like so:The issue can be seen here
Patched version can be seen here
I apologize, I don't yet know coffeescript well enough to submit a pull request, but I have provided a diff of the javascript files if that helps. The main difference is a
define
wrapper at the top, and returning the global at the bottom. (code borrowed from knockout.js):http://www.diffnow.com/?report=ignzq
Regards,
Aaron
The text was updated successfully, but these errors were encountered: