Every once in awhile I hit a (technical) wall, stumble upon a great tool or look for a reason to improve my English.
This is my place to share, welcome to my logs.
I like .less alot, we use it in most of our webprojects. With the release of Visual Studio 2013 Update 1 a new feature has arrived. Full Less integration within VS, thats awesome.
To use Less in your project you can simply add the following lines to your Web.Config
file:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>
When you are like me, and use Less in almost all of your projects and use IIS Express to run your webprojects and don't want to add the lines to your Web.Config
all the time. You can add it to your default IIS Express configuration, like so:
username
\Documents\IISExpress\configapplicationhost.config
with Visual Studio or your favorite text-editor.mimeMap
, you should find lots of 'em.<mimeMap fileExtension=".less" mimeType="text/css" />
.The result should be something like this:
<staticContent lockAttributes="isDocFooterFileName">
<mimeMap fileExtension=".less" mimeType="text/css" />
<mimeMap fileExtension=".323" mimeType="text/h323" />
<mimeMap fileExtension=".3g2" mimeType="video/3gpp2" />
<mimeMap fileExtension=".3gp2" mimeType="video/3gpp2" />
<mimeMap fileExtension=".3gp" mimeType="video/3gpp" />
<mimeMap fileExtension=".3gpp" mimeType="video/3gpp" />
<mimeMap fileExtension=".aac" mimeType="audio/aac" />
...
Restart Visual Studio, delete the mimeMap from your Web.Config and you're setup!