I'd like to use guard to watch more than one directory and output to more than one directory, respectively.
You see, where I work we use one mvc framework installation base to serve more than one site (specifically a mobile and desktop version), and I'm often working on both at the same time. Each site has their own css directory, compass.rb file and setup in Gaurdfile. I'd like each site's sass files to be compiled into css in it's own css directory, whilst only having to run one guard (as the Guardfile lives in the project root).
Below is my current Guardfile:
guard 'livereload', :host => '127.0.0.1', :port => '35729' do
watch(%r{.+\.(html|js|php|css|gif|jpeg|jpg|png)$})
end
guard 'compass', :project_path => 'www/specialeditions_html/', :configuration_file => 'www/specialeditions_html/compass.rb' do
watch(%r{.+\.(sass|scss)$})
watch(%r{images/.+\.(jpg|gif|png)$})
end
guard 'compass', :project_path => 'facebook/special_edition_html/', :configuration_file => 'facebook/special_edition_html/compass.rb' do
watch(%r{.+\.(sass|scss)$})
watch(%r{images/.+\.(jpg|gif|png)$})
end
But when I edit and save a .scss file in www/specialeditions_html/, the output in the terminal is:
It's like compass has started twice, but is watching the same directory (the second one in the Guardfile). Note that no changes have been compiled (confirmed in browser).
Hi,
I'd like to use guard to watch more than one directory and output to more than one directory, respectively.
You see, where I work we use one mvc framework installation base to serve more than one site (specifically a mobile and desktop version), and I'm often working on both at the same time. Each site has their own css directory, compass.rb file and setup in Gaurdfile. I'd like each site's sass files to be compiled into css in it's own css directory, whilst only having to run one guard (as the Guardfile lives in the project root).
Below is my current Guardfile:
But when I edit and save a
.scss
file inwww/specialeditions_html/
, the output in the terminal is:It's like compass has started twice, but is watching the same directory (the second one in the Guardfile). Note that no changes have been compiled (confirmed in browser).
www/specialeditions_html/compass.rb
:www/special_edition_html/compass.rb
:Is there a config I'm missing, or is this just not possible whilst running one instance of guard?