Rake your site

Posted by connatser on Dec 29, 2011 in Development | No Comments

Not to get too long winded about what this code does, it basically kicks your web deployment into high gear. It’s no secret that I love Ruby/Rake/Automation/Being Lazy, so I wrote a Rake script to manage concatenating/compressing my js and css, and deploying the site…at the same time testing in a couple of browsers. Now, these aren’t the only browsers I test in, so get off of your soap box…this is a sample script.

This rake file takes all of your js and css, listed in the _assets.yml file, and runs them through Jammit to concatenate and compress them, dramatically decreasing file size. Having said that, you will need to install Jammit for this script to work. It then copies your public release to your dev and qa locations, followed by opening Chrome and FireFox for testing. The QA section is set up for SSH, if you are so inclined.

To run, simply place the RakeFile and _assets.yml file in your root and run “rake deploy:test“.

-connatser

Switch to our mobile site