Skip to content

Instantly share code, notes, and snippets.

@glidenote
Created October 31, 2012 05:02
Show Gist options
  • Save glidenote/3984899 to your computer and use it in GitHub Desktop.
Save glidenote/3984899 to your computer and use it in GitHub Desktop.
Rakefile.diff
diff --git a/Rakefile b/Rakefile
index 183ee17..8f01014 100644
--- a/Rakefile
+++ b/Rakefile
@@ -73,18 +73,18 @@ end
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}"
+ puts "Starting to watch source with Jekyll and Compass. Starting Thin 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}")
+ thinPid = Process.spawn("thin start --port #{server_port}")
trap("INT") {
- [jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
+ [jekyllPid, compassPid, thinPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
exit 0
}
- [jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) }
+ [jekyllPid, compassPid, thinPid].each { |pid| Process.wait(pid) }
end
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment