My JS13k game submission. I tried to comment out my thoughts as I programmed this. So I hope it's somewhat readable. I ended up not having a lot of time so didn't need to optimize everything to the fullest.
Unfortunately only tested on Chrome will probably break in anything else.
Although I've added a gulp workflow, the whole minification of the JavaScript is done by manually pasting the content of all the files into one main file and running it through the Uglyfier.