2

I'd love to use Bourbon with LiveReload but I can't seem to get them to work together. Anybody successfully made these two play nice?

TylerH
  • 20,799
  • 66
  • 75
  • 101
cmal
  • 1,751
  • 5
  • 18
  • 29

3 Answers3

5

If you use the 'Run a custom command after processing changes' option rather than the standard compilation option, then you can use the commands as detailed on the readme.

# Example (project root directory)
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/bourbon/lib/bourbon.rb

I wrote a blog post covering this.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Adam Wiggall
  • 393
  • 2
  • 7
  • Adam: I wasn't able to make this work. Using the following command under _Run a custom command after processing changes,_ LiveReload hangs after I change the file. It's obviously doing something, but it's failing. The same command works find from the CLI. `sass --watch styles/site.scss -r ./styles/bourbon/lib/bourbon.rb` – cmal Nov 07 '12 at 14:35
  • CMAL, The only thing I can think of that may cause an issue here is that the sass command you are entering has the correct paths relative to the folder you are watching in LiveReload. In other words, when you run this from the cli are you in the same directory as the one that LiveReload uses for this project? – Adam Wiggall Nov 10 '12 at 03:09
  • Adam: Yep, in both cases I'm in the root directory for the project. Very mysterious. In lieu of figuring this out, I've ended up just using LiveReload on a 0.3s delay to refresh the browser, and watching sass/bourbon via the terminal. Not elegant, but it works. – cmal Nov 10 '12 at 06:20
1

If you install the latest version (3.0.0) of Bourbon and install bourbon into your compass sass directory:

bourbon install --path ./sass

You can then use LiveReload with one small tweak. You will need to replace LiveReload's version of SASS with at least 3.2.3, since Bourbon requires this.

Instructions on how to replace LiveReload's default SASS version can be found here: http://carl-topham.com/theblog/post/changing-version-sass-livereload/

This seems to work for me.

Del Putnam
  • 273
  • 4
  • 8
0

I've been told you can get it to work by passing the lib/bourbon.rb file into the "Run a custom command" option in LiveReload. See attached image. image

Phil L.
  • 389
  • 2
  • 7