title: Automatically compile less css files in mac os x
body: <p>I have started using less CSS. </p>
  
  <p>I have written a small bash script which calls the "lessc" command with my target file and then pipes it into my finished css file. It looks something like this: </p>
  
  <pre><code>#!/bin/bash
  lessc ~/Documents/Development/Projects/blog/static/css/global.less --watch &gt; ~/Documents/Development/Projects/blog/static/css/styles.css -x
  </code></pre>
  
  <p>This -x flag compresses the CSS. </p>
  
  <p>As you can see I have tried to use the --watch flag which from what I understood would mean it would automatically recompile the CSS every time you make a change to the less files. But this doesnt seem to work. </p>
  
  <p>I realise I could use the "less app" that someone has written, but Im curious as to how to do this myself, as it's clearly possible. </p>