anaisbetts / SassAndCoffee

SassAndCoffee adds support in ASP.NET MVC to (you guessed it!) Sass/SCSS and CoffeeScript
http://blog.paulbetts.org/index.php/2011/06/06/new-release-sassandcoffee-0-9-now-not-glacially-slow/
Microsoft Public License
199 stars 37 forks source link

Allow .coffee files to be access via .coffee extension #28

Closed ScottWeinstein closed 12 years ago

ScottWeinstein commented 12 years ago

It would be a nice feature if we could asses .coffee files via their actual .coffee extension

kogir commented 12 years ago

To return the raw contents of the .coffee file, you need to add an IIS Mime-Type for it. I don't think one has been formally assigned, but you could probably get away with text/plain or text/coffeescript.

If you want to have requests for the .coffee file return the compiled javascript result, I'd recommend writing your own quick HttpModule to do the remapping, or using URL Rewrite http://www.iis.net/download/urlrewrite. Right now SassAndCoffee always defers to existing files when present and lets IIS serve them as-is. I don't feel super strongly about it, but would prefer to keep that behavior since it's least surprising.