summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Rakefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index b7c8e2d..f69f0f1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,3 +4,16 @@ task :build do
`env MRUBY_CONFIG=build_config/felflame_linux.rb rake`
end
end
+
+task :serve do
+ link = "http://localhost:8000/game.html"
+ if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
+ system "start #{link}"
+ elsif RbConfig::CONFIG['host_os'] =~ /darwin/
+ system "open #{link}"
+ elsif RbConfig::CONFIG['host_os'] =~ /linux|bsd/
+ system "xdg-open #{link}"
+ end
+ `ruby -run -ehttpd build/temp/ -p8000`
+end
+task :s => :serve