As I was installing all this ruby stuff (yeah I still hate that I need to use Ruby :) ) and was having troubles with all the watching/guarding of auto compiling I saw few different ways to make this work.

"compass watch"
"bundle exec guard"
"drush omega-guard"

So what is what here, seems it all does the same thing in the end, but wondering what is what?

Comments

minneapolisdan’s picture

In my brief research on the matter, "compass watch" is just as fine for compiling your Sass as running "bundle exec guard". Guard has some additional features that may be useful to you, such as a live reload component, the ability to work with and compile other code (e.g. JavaScript), and more. I watched the video here, http://code.tutsplus.com/tutorials/guard-is-your-best-friend--net-31021

fubhy’s picture

In my brief research on the matter, "compass watch" is just as fine for compiling your Sass as running "bundle exec guard"

"bundle exec" is really just a prefix that pipes whatever follows through bundler and thereby applies the correct context and gems specified by the Gemfile. Hence, you should always use "bundle exec", even for "compass watch" ("bundle exec compass watch"). Otherwise, compass will just use whatever the latest version of the available Gems are, which might not be appropriate. Always use Bundler!

So... "bundle exec compass watch" => Watches your files and compiles them to Sass, no more, no less.
"bundle exec guard/grunt" ... Or ... "gulp" (new kid of the block) => Anything you want it to do (including compiling Sass, Coffeescript, Uglifying your Js, Livereload, etc. etc. (no limits in terms of extendability).

If you just need something to compile your Sass => CSS... Use plain "bundle exec compass watch". If you want to be more fancy and automate your entire front-end stack (and more), use one of guard/grunt/gulp.

Me and my team just recently switched from Grunt to Gulp. But that's really a matter of taste and totally up to you. There are numerous blog posts (Google!) that explain the differences and benefits/drawbacks of either technique. You choose!

Marko B’s picture

And what is "drush omega-guard" just an alias for bundle exec guard ?

fubhy’s picture

Correct. That was initially written to allow you to trigger guard without the need to navigate into the theme folder. I personally don't use that though. There is really no benefit other than that.