Skip to content

Consider using anonymous define #44 - #45

Merged
ajacksified merged 6 commits into
ajacksified:masterfrom
pedroetb:master
Mar 22, 2018
Merged

ajacksified merged 6 commits into
ajacksified:masterfrom
pedroetb:master

Conversation

@pedroetb

Copy link
Copy Markdown
Contributor

It works for Dojo.

@ajacksified

Copy link
Copy Markdown
Owner

Does this break other AMD implementations?

@pedroetb

Copy link
Copy Markdown
Contributor Author

I only tested it with Dojo, but I think it should work with any AMD loader. After a little read, I believe that the named modules are only necessary for compatibility with non AMD code:

".. the module_id is an optional argument which is typically only required when non-AMD concatenation tools are being used .." -> (http://addyosmani.com/writing-modular-js/)

Here is an interesting thought about this topic (with some other references inside):
https://groups.google.com/forum/#!topic/amd-implement/VAtOIIyVrOs

Thanks for your time!

@pedroetb

pedroetb commented Apr 8, 2016

Copy link
Copy Markdown
Contributor Author

Adds the fix for issue #47

Now it works as described in readme, but without the need of setting a subscription to the publishing channel ("application:chat:receiveMessage"):

// will call parents of the application:chat:receiveMessage namespace
// (that is, next it will call all subscribers of application:chat, and then
// application). It will not recursively call subchannels - only direct subscribers.
mediator.publish("application:chat:receiveMessage", "Jack Lawson", "Hey");

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

Successfully merging this pull request may close these issues.

3 participants