Skip to content

Commit

Permalink
ensures compiled /source/stylesheets/screen.css exists before running…
Browse files Browse the repository at this point in the history
… watch and preview tasks, fixes imathis#214
  • Loading branch information
imathis committed Oct 11, 2011
1 parent 09c1c61 commit 86c72a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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}")
Expand Down

0 comments on commit 86c72a4

Please sign in to comment.