diff --git a/run.n b/run.n index 21c95587f..0843b496b 100644 Binary files a/run.n and b/run.n differ diff --git a/script/src/RunScript.hx b/script/src/RunScript.hx index dcf93d78a..c185ff137 100644 --- a/script/src/RunScript.hx +++ b/script/src/RunScript.hx @@ -72,19 +72,14 @@ class RunScript { return true; - case "test": - if(data == 'html5') { - if(data2 == '-server') { - //check if the server note file exists - var args = ['server', '-p', '55555', '-h', 'localhost' ,'-d' , cwd + 'bin/html5/bin/']; - new sys.io.Process('nekotools', args); - new sys.io.Process('open', ['http://localhost:55555/']); - return true; - } - } - - return false; + case "serve": + var args = ['server', '-p', '55555', '-h', 'localhost' ,'-d' , cwd + 'bin/html5/bin/']; + new sys.io.Process('nekotools', args); + new sys.io.Process('open', ['http://localhost:55555/']); + + return true; + default: return false; }#end @@ -131,7 +126,7 @@ class RunScript { //remove the CWD from the args args = args.splice(0,args.length-1); - if(args.length-1 > 0) { + if(args.length-1 > 0 || args[0] == 'serve') { var local_command = process_command(args); @@ -162,6 +157,7 @@ class RunScript { Sys.println(" commands : "); Sys.println("\ttest \n\t Build and run"); Sys.println("\tbuild \n\t Build"); + Sys.println("\tserve \n\t This is for html5 target, launches a server and opens the page. \n\ti.e luxe build html5 && luxe serve"); #if pathtools Sys.println("\tcreate \n\t Create a copy of inside present working directory");