title: Generate CSS from Sass using a rake task and write to file
body: <p>I have a non-ruby project that uses a rake task for its build process.  The project is an HTML5/JS app that supports several platforms.  The rake task is used to build packages for specific platforms and only includes files relevant to that particular platform. Each platform has a different CSS file that currently is copied to the base directory, and then all the relevant files from the base directory get packed up.</p>
  
  <p>I want to convert these CSS files to Sass. Instead of doing a file copy, the rake task would read the file, translate it to CSS, then write the CSS file to the base directory before packing things up. Can someone provide an example of how to do this?  It would be replacing this simple line of code in my rakefile:</p>
  
  <pre><code>FileUtils.copy_file("config/platforms/#{platform}/style.css", "style.css")
  </code></pre>