From 86c72a4ca6355813677335351b6fce2d82d55a46 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 11 Oct 2011 15:14:41 -0500 Subject: ensures compiled /source/stylesheets/screen.css exists before running watch and preview tasks, fixes #214 --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 1206787e..234e65a9 100644 --- a/Rakefile +++ b/Rakefile @@ -58,6 +58,7 @@ desc "Watch the site and regenerate when it changes" task :watch do raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) puts "Starting to watch source with Jekyll and Compass." + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") jekyllPid = Process.spawn("jekyll --auto") compassPid = Process.spawn("compass watch") @@ -73,6 +74,7 @@ desc "preview the site in a web browser" task :preview do raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}" + system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css") jekyllPid = Process.spawn("jekyll --auto") compassPid = Process.spawn("compass watch") rackupPid = Process.spawn("rackup --port #{server_port}") -- cgit v1.2.1