{"issue":{"state":"open","created_at":"2011-12-10T17:21:43Z","updated_at":"2011-12-12T04:39:39Z","comments":4,"user":{"gravatar_id":"00ac28bdce61e7db41be57fb3b7f3525","id":73359,"url":"https://api.github.com/users/jrburke","login":"jrburke","avatar_url":"https://secure.gravatar.com/avatar/00ac28bdce61e7db41be57fb3b7f3525?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"This came up in this [pull request for CoffeeScript](https://github.com/jashkenas/coffee-script/pull/1826), where brequire may not be able to handle this form:\r\n\r\n```javascript\r\n    define(function () { });\r\n```\r\n\r\nI am a bit unclear on the part that fails for brequire -- it looks like brequire is used to generate a transport form of CommonJS modules for use in the browser. So is the concern that the transform step does not find these anonymous define calls or that brequire uses AMD in the browser wrapping code, and cannot process the anonymous require calls?\r\n\r\nA bundling tool for AMD libraries will need to name the anonymous define calls when bundling up the libraries.","assignee":null,"id":2511822,"number":3,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Support for AMD define(function () { }); form","html_url":"https://github.com/weepy/brequire/issues/3","closed_at":null,"url":"https://api.github.com/repos/weepy/brequire/issues/3","milestone":null},"action":"created","comment":{"created_at":"2011-12-12T04:39:39Z","updated_at":"2011-12-12T04:39:39Z","user":{"gravatar_id":"00ac28bdce61e7db41be57fb3b7f3525","id":73359,"url":"https://api.github.com/users/jrburke","login":"jrburke","avatar_url":"https://secure.gravatar.com/avatar/00ac28bdce61e7db41be57fb3b7f3525?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Oh the above module declaration just defines the module as an object, that has a property named 'prop'. I was just trying to show an object with a property and value in it, just an example. So all these three end up declaring 'foo' to be an object with a property named 'prop':\r\n\r\nIn foo.js:\r\n\r\n```javascript\r\ndefine('foo', [], function () {\r\n    return { prop: 'value' };\r\n});\r\n\r\n//or:\r\n\r\ndefine(function () {\r\n    return { prop: 'value' };\r\n});\r\n\r\n//or:\r\n\r\ndefine({ prop: 'value' });\r\n\r\n```","id":3102024,"url":"https://api.github.com/repos/weepy/brequire/issues/comments/3102024"}}