summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-01-12 11:37:53 -0500
committerrealtradam <[email protected]>2022-01-12 11:37:53 -0500
commit1fbddef75580cfaf6b25a1d328b29225ef563ed7 (patch)
tree6c61b6ecaa84e1b5233e2ab55aef71647569c543 /Rakefile
parentc5923d9ec44a34a4f27b7bb6abf447b9fc1bbf1a (diff)
downloadFelFlameEngine-1fbddef75580cfaf6b25a1d328b29225ef563ed7.tar.gz
FelFlameEngine-1fbddef75580cfaf6b25a1d328b29225ef563ed7.zip
added rake serve task to show game in browser
Diffstat (limited to 'Rakefile')
-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