cletusc / Userscript--Twitch-Chat-Emotes

Adds a button to Twitch that allows you to "click-to-insert" an emote.
http://cletusc.github.io/Userscript--Twitch-Chat-Emotes/
MIT License
36 stars 20 forks source link

Move to event-based internal communication #81

Open cletusc opened 9 years ago

cletusc commented 9 years ago

Modules need to communicate, but don't need to be spaghetti. Having everything all so tightly intertwined isn't good at all and defeats the purpose of modules.

Move to emitting events on subscribing to events to handle communication between modules. I will likely use https://www.npmjs.com/package/eventemitter3 for this.

cletusc commented 9 years ago

Event planning is going to be here for the time being: https://docs.google.com/spreadsheets/d/1ryMT8TJa11hK72PLaimwBxT8u7pP-oEXFyvsbsYez6I/edit?usp=sharing

I started the basics of the code, but got a bit lost without something showing me which events I've already done.