Skip to content

Instantly share code, notes, and snippets.

@TerasawaShuhei
Created August 30, 2013 14:12
Show Gist options
  • Save TerasawaShuhei/6390274 to your computer and use it in GitHub Desktop.
Save TerasawaShuhei/6390274 to your computer and use it in GitHub Desktop.
jekyll serve --watch と同時にブラウザで開く。
require 'bundler/setup'
require 'thread'
require 'launchy'
desc 'preview'
task :preview do
Thread.new do
sleep 1
Launchy.open 'http://localhost:9001/'
end
sh 'bundle exec jekyll serve --watch'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment