-- mode: markdown --
TODO!
lip? mouth? backtalk? guff? sauce?
Leading contender: sauce
I want to write a SASS compiler in Clojure. Or find one that can be consumed by Clojure (e.g. is written in Java). I want to do this so that I can use SASS in my Clojure web projects.
I don't mind writing one myself, because I think it would teach me two things:
- SASS
- How to write parsers/compilers
As a side benefit, it would be nice if the Clojure community wound up with a SASS parser they could use.
The canonical SASS implementation is written in Ruby. I want something that can be included as a Maven dependency: relying on JRuby is too heavy a dependency.
That said, I think whatever I come up with should use the canonical one as the reference implementation and be able to do whatever it does, or at least provide a subset that works the same way.
Recommendation: TODO.
URL: http://code.google.com/p/jsass/
Recommendation: Undecided. Grammar may prove useful. TODO.
- Written in Java
- Has an ANTLR grammar here ** If nothing else, this could provide a good starting point for a Clojure implementation
- Looks like it hasn't been updated in a long time
URL: https://github.com/darrinholst/sass-java
Recommendation: Do not use.
It's a "filter", whatever that means.
- Appears to require JRuby
- Looks like all it does is call out to Ruby to do the actual work
TODO
Decide first if it makes sense to just use the canonical SASS tools. If that's not a slam dunk, see what it would take to use something that's out there (looks like that's just jsass). If that doesn't seem like it would work, start thinking about what it would take to write one.
Should I just use this one? Is there a good reason to have a Clojure implementation, or should I just use the sass command-line tool to convert SASS to CSS whenever I need to? On the one hand, it's not a big deal to run SASS through the converter. It wouldn't even be that hard to call out to the SASS converter dynamically from the web app. Presumably, there are lots of ways to do that, from manually to having the web app invoke the converter directly to having it get invoked by Leiningen somehow.
It does seem a little weird and off-putting to require that a Ruby tool be installed to do Clojure web work. But that begs the question whether I'm writing a general-purpose tool or just trying to do something one-off to support a particular project.
TODO
TODO