tbranyen/backbone-boilerplate — pull request #84 by tkellen (2012-03-12 17:55:18+00:00)
Title: Pre-Baked Less Support

This pull request makes a bunch of changes:

1. style.css is now style.less. index.css imports it as style.less (this works fine even if you're just doing plain css).
2. lessinit.js has been added to libs/js. On load, it renames the rel attribute on index.html's to "stylesheet/less" and requires the client side less compiler after. This automatically triggers less compilation. There is a very slight flicker on initial load as a result of this.
3. lessinit is mapped to "less" in require.config paths. The module is required in main.js, but it is configured to be rewritten to nothing during the build process (using 1.0.7 onBuildWrite). The takeaway here is that the less loader only runs during development and does not become a part of the release build.
4. server:debug mode now maps assets/css to dist/debug, to hit the less-compiled css. The only gotcha here is that it isn't actively recompiled. I don't think this matters much, though, as you can do all of your debugging in "build server" mode. Perhaps this could be fixed with a watch task?
5. A less task has been added to the build config to compile style.less into debug/index.css.
6. When building for release, the less-compiled debug/index.css is minified to release/index.css.

I think it is pretty safe to say that anyone on the bleeding edge of web development is going to want some kind of css transpiler available as a default in their boilerplate. Thoughts?