This library adds simple, drop-in support for Sass/SCSS as well as CoffeeScript. Javascript and CoffeeScript files can also be minified and combined via UglifyJS.
First, add the desired package reference(s) via NuGet. You probably want SassAndCoffee.AspNet.
<script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/main.js" />
<script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/main.bare.js" />
<script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/main.min.js" />
will serve the minified version of <script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/main.js" />
<script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/main.bare.min.js" />
# This line is a comment
# Include our minified CoffeeScript file with an absolute path
~/Scripts/main.min.js
# Include another file in ~/Scripts
header.js
# Include a file in a subfolder of ~/Scripts
subfolder/file.js
<script src="https://github.com/anaisbetts/SassAndCoffee/raw/master/Scripts/home.js" />
<link href="https://github.com/anaisbetts/SassAndCoffee/blob/master/Content/site.css" type="text/css" />
@import "";
directives<link rel="stylesheet" href="https://github.com/anaisbetts/SassAndCoffee/blob/master/Content/site.min.css" type="text/css" />
will serve the minified version of <link rel="stylesheet" href="https://github.com/anaisbetts/SassAndCoffee/blob/master/Content/site.css" type="text/css" />
SassAndCoffee offloads caching and compression to ASP.Net and IIS. To modify the default cache settings, alter the SassAndCoffeeCacheSettings
cache profile in web.config. To enable compression, install IIS's compression features.
SassAndCoffee watches your source files for changes and invalidates the cache when appropriate.
SassAndCoffee embeds the original compilers in the DLL (Sass 3.2.0 and CoffeeScript 1.1.3 as of this writing) and uses IronRuby and JScript respectively to execute the compilers against your source.
SassAndCoffee will even use IE9's faster Chakra JScript engine if it's detected. Since JScript doesn't ship with Windows Server Core editions, it will not work on those systems.
If you run into bugs / have feature suggestions / have questions, please either send me an Email at paul@paulbetts.org, or file a Github bug.
Several folks helped me out with some of the integration details of this project
if it weren't for them, I would still be stuck in the mud right now:
David Padbury for helping me out with the CoffeeScript compiler
Levi Broderick for giving me a few hints as to how to rig up the HttpModule
Jimmy Schementi for telling me the proper way to redirect 'requires' to an embedded resource
Thanks to Hampton Catlin and Jeremy Ashkenas for creating such awesome languages in the first place
The folks on the #chromium IRC channel for helping me with a tricky V8 issue
Steven Robbins for the ton of work put in to refactor the code to work with NancyFx and other non-ASP.NET frameworks
Adds Sass/SCSS, CoffeeScript, and UglifyJS support to ASP.Net projects. Works with WebForms and MVC
The SassAndCoffee JavaScript compilers for CoffeeScript and UglifyJS. Great for integration into your own packages. Just include it as a dependency.
The SassAndCoffee Ruby compilers for Sass/SCSS. Great for integration into your own packages. Just include it as a dependency.
Shared components used by SassAndCoffee.JavaScript and SassAndCoffee.Ruby. Unlikely you'll want to reference this directly.
This legacy package is now an alias for SassAndCoffee.AspNet.