malditogeek/vmux — pull request #29 by rachkoud (2014-07-22 17:26:26+00:00)
Title: Add source maps and coffee-script 2 support and an option to bundle VMUX with webpack

```gulp``` can be used with ```--debug``` option to bundle VMUX with source maps which provides debugging with coffescript files to browsers that support it. With ```--debug``` and ```--bundleMode=browserify```, source maps are generated at the end of the files ```site.js``` and ```vmux.js``` and with ```--debug--``` and ```--bundleMode=webpack```, two additional files are generated, ```vmux.js.map``` and ```site.js.map``` for source maps.

Firebug debugger provides better results when debugging coffeescript files. Chrome has few bugs with source maps, for example there are some lines where we cannot put a breakpoint ([see here](https://code.google.com/p/chromium/issues/list?can=2&q=sourcemap+breakpoint&colspec=ID+Pri+M+Iteration+ReleaseBlock+Cr+Status+Owner+Summary+OS+Modified&x=m&y=releaseblock&cells=tiles)).

The default coffeescript compiler is used when you bundle VMUX with ```gulp``` (to set it explicitly, you can use the option ```--coffeeScriptCompiler=coffeeScript```) or you can use coffee-script-redux (coffee-script 2) [compiler](https://github.com/michaelficarra/CoffeeScriptRedux) by using ```coffeeScriptCompiler=coffeeScriptRedux``` to have a better coffeescript debbuging experience.