[SalesForce] Using SASS with Visualforce

As we build some bigger projects, I've been thinking about using a CSS pre-processor like SASS to help manage our CSS resources. Developing on Salesforce, though, I could see that getting complicated: All of our static resources are in a zipped Static Resource file (which we typically edit in Eclipse using the ZipEditor plug-in) so we'd need some way to build the scss files into css without adding too much complexity or extra work. What development tools can help us do this effectively?

Best Answer

I don't use SASS, but we do something similar: run our JS through an optimizer/compiler.

We created a simple Ant script that compiles the JS, puts it in a folder hierarchy for our main JS static resource, zips the static resource file, and re-deploys it (by calling the Force.com Migration Toolkit "deploy" Ant task).

It's a bit of a pain - takes a total of about 30 seconds from editing a JS file to deploying it. Using a good set of developer tools that allow real-time in-browser testing of JS/CSS changes (without deployment) is your friend.