Today I read a very interesting idea by @martijndevalk.
It was about compiling Sass files, using Compass, for production and for development at the same time.
This is very smart - instead of re-compiling for production before you push your CSS to the live server you can simply compile two versions of your style sheets using a single command!
Martin's suggestion was to use a script that will run two compass watch processes, one with
-e development and the other with
-e production, then copying the production style sheet into a .min.css file.
I really like the idea but I decided to take a different approach - I will create a different configuration file for my production environment, and compile using this configuration into a different location. This is how it works:
Now go ahead and compile your style sheets just as you would normally - your production style sheets will get updated seamlessly whenever something changes.