-
Notifications
You must be signed in to change notification settings - Fork 156
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
Support AMD (Asynchronous Module Definition) in require! #195
Comments
I really think this is going too far. -1 |
According to http://requirejs.org/docs/whyamd.html#amdtoday, AMD isn't just Dojo-specific. |
True. But the syntax isn't always the same - require.js AFAIK doesn't |
Sorry, it looks like my idea can be misunderstood. I suggested not to return declare, but just add |
Whoops |
It seems this commit closes satyr/coco#195, but not the current issue. |
Any word on this? Some great libraries are being written in LiveScript that I would like to use in browser-based projects, which for me means AMD-based projects, but I am not sure how to proceed. |
I think the best solution is to use something like https://github.com/substack/node-browserify ie. write it like it's a node project, and then use a tool to turn it into something that works in the browser |
I recommend https://github.com/michaelficarra/commonjs-everywhere, it plays very nicely with LiveScript and other compile-to-JS languages. |
It would be nice if LiveScript works with commonjs-everywhere and with SourceMap support. |
Just to throw something else in here. We write LiveScript commonjs modules then use grunt and https://github.com/anodynos/uRequire to convert them into AMD. The setup works great. |
Going to close for now. Feel free to bump if you have any idea for a good implementation that'd work without breaking anything else and without adding a lot of code |
It's worth for require! to support other module systems than RequireJS, such as AMD, as TypeScript does. Switching between CommonJS and AMD can be provided via compiler commandline options, for example. Some pieces of code that might be with require! and AMD support, using Dojo Toolkit:
Simple example:
Require with parameters:
or
Define:
The text was updated successfully, but these errors were encountered: