5 ms·
This reminds me vaguely of what Coffeescript does for Javascript (http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/). It's a
by mmastrac 17y ago
This reminds me vaguely of what Coffeescript does for Javascript (http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/). It's a nicer, more modern syntax than the underlying language.
The killer is that they both require a compile to make it usable by a web browser. It would be far nicer if the compilers were written in JS and processed the languages dynamically.
The final compile before deployment can still happen via command-line tool, but this lets developers work in a simple edit-save-refresh environment.
- ryanwaggoner 17y agoOr even better, a server-side module or component that Apache sends all .sass files to, and it outputs css.
- jlong 17y agoFor development I like to use Serve: http://github.com/jlong/serve http://github.com/jlong/serve
- jamesbritt 17y agoSounds like a job for Rack, too.
- endergen 17y agoI believe that if you use Compass, it has a command line utility that watches for changes and then compiles the appropriate files automatically when changes occur. This makes your workflow similar to working with css where you have refresh to see your changes. See documentation for more detail: http://wiki.github.com/chriseppstein/compass/command-line-tool http://wiki.github.com/chriseppstein/compass/command-line-to...
- wfarr 17y agoFuture versions of sass will support this without 'having' to use Compass.
- toothcomb 17y agoExactly. I can't even imagine the awkwardness of having to compile CSS. The advantage of CSS as a text file is speed.
- jlong 17y agoUm, tools like Compass, Serve, and the Rails plugin totally remove any awkwardness.
- jashkenas 17y agoIt's in the works. If all goes well, hopefully the CoffeeScript-in-CoffeeScript compiler will become the mainline: http://github.com/creationix/coffeepot http://github.com/creationix/coffeepot Here's a link to Tim's alpha, which is able to parse a limited subset of CoffeeScript (we need to figure out what to do with left-recursive rules): http://static.creationix.com/coffeepot/test/browser.html http://static.creationix.com/coffeepot/test/browser.html
- nickpleis 17y agoWe're a django shop and that's essentially what we do. We already use the django template engine in our javascript/css files (primarily for URL generation, but it's grown to be several other things). We plugged in Sass and it's been great. The development servers passes CSS files through the django template engine and Sass every time it's served. In production we do it just during deployment. Thus what sits on our CDN is the end result. From a developers pesrpective your always editing the 'source' file not the 'compiled' version. It's seamless and works great.
- Semiapies 17y agoI use Less and just run the lessc tool in --watch mode. A beat after I save the .less file, the .css file is updated.