moose-team / friends

:tv: P2P chat powered by the web.
http://moose-team.github.io/friends/
MIT License
3.17k stars 341 forks source link

Move command switch to command.js #118

Closed bcomnes closed 9 years ago

bcomnes commented 9 years ago

This is a simple dropin patch that moves the command switch to its own file. We can make it more OO if we want, but for now lets just get all of this out of app.js

bcomnes commented 9 years ago

This should also get the ball rolling on https://github.com/moose-team/friends/issues/117

beaugunderson commented 9 years ago

:+1:

bcomnes commented 9 years ago

One question I have: This is just a simple closure.... looks like there are some fancier prototype chain stuff going on in app.js. Should I be passing self around differently?

ungoldman commented 9 years ago

@bcomnes I think it's sufficient for now, can be refactored as necessary :+1:

ungoldman commented 9 years ago

@bcomnes Adding you to moose-team!