Code Monkey home page Code Monkey logo

sassandcoffee's Introduction

SassAndCoffee

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.

How to use:

  • Add the package reference via NuGet
  • Add a .coffee, .scss, or .sass file to your project (an easy test is to just rename a CSS file to .scss)
  • Reference the file as if it was a CSS file (i.e. to reference "scripts/test.coffee", you should reference "scripts/test.js" in your SCRIPT tag)
  • To get the minified version of a script, reference the file as ".min.js" (i.e. "~/Scripts/MyCoolFile.min.js")

That's all there is to it! Files will be cached in your AppData folder and will be regenerated whenever you modify them.

How does it work?

SassAndCoffee embeds the original compilers in the DLL (Sass 3.2.0 and CoffeeScript 1.1.0 as of this writing) and uses IronRuby and Jurassic respectively to execute the compilers against your source.

Combining files

To combine a group of Javascript files together into one file, create a file in your scripts folder with an extension of ".combine" - in this file, list the files you want to combine (either as paths relative to the same folder, or as full paths via '~'). Then, reference the file as if it were a Javascript file (i.e. "all_debug.combine" => "all_debug.js")

Why is this better than [SOMEOTHERPROJECT]

  • No external processes are executed
  • You don't have to install Ruby or node.js
  • It's in NuGet so you don't have to fiddle with web.config
  • Files are cached and are rebuilt as-needed.

Problems

If you run into bugs / have feature suggestions / have questions, please either send me an Email at [email protected], or file a Github bug.

Thanks to:

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

sassandcoffee's People

Contributors

anaisbetts avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.