Conditional compilation in CoffeeScript/UglifyJS
问题 Using Coffeescript I need to have a go through a build script anyway to update my .js files, and I have two of them, one for debugging and one for production (one uses Uglify to minimize the files, one does not). So I was thinking that it would be convenient to have some conditional compilation as well, with code that only enters the debug build. What is the easiest way to achieve this, ideally controlled by a simple command line switch that I can give to either coffee or uglify? 回答1: If you