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
Will there be AMD support? #50
Comments
See #24. CommonJS + Browserify. Alternatively you can just use webpack instead of browserify to create modules. And use AMD as you would normally do pull in a webpack module (that could be not just js). I haven't used it, but I am assuming thats how it would work. |
@ktei can you explain what you mean by AMD support? Are you saying you'd like T3 to be available as an AMD module or something else? |
@nzakas Sorry I think my question is a bit confusing. What I actually meant is these lines of code support (for example, in jquery.js) if ( typeof define === "function" && define.amd ) {
define( "jquery", [], function() {
return jQuery;
});
} I should have said requirejs support ; )' And isn't that it'd be better if it's |
The wrapper done for CommonJS should be expanded using the UMD standard block so that the wrapper can always be added and the files can be used in AMD, CommonJS, or VanillaJS. This page has very simple sample code showing what the header would look like. I'm not saying use Browserify (which can add this automatically). The method to handle CommonJS was to have a header.js and footer.js that can be added to the build in the make file. I think the header and footer simply need a little updating to work with all three methods and then the header and footer can always be added during make, even if you want Box on the global namespace. http://dontkry.com/posts/code/browserify-and-the-universal-module-definition.html |
@ktei we can look at adding this. We've used |
Hi, will there be AMD support so that requirejs can work? Cheers
The text was updated successfully, but these errors were encountered: