Adding luxe serve command for opening the html5 build in a local server
This commit is contained in:
@@ -72,18 +72,13 @@ class RunScript {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case "test":
|
case "serve":
|
||||||
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/'];
|
var args = ['server', '-p', '55555', '-h', 'localhost' ,'-d' , cwd + 'bin/html5/bin/'];
|
||||||
new sys.io.Process('nekotools', args);
|
new sys.io.Process('nekotools', args);
|
||||||
new sys.io.Process('open', ['http://localhost:55555/']);
|
new sys.io.Process('open', ['http://localhost:55555/']);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@@ -131,7 +126,7 @@ class RunScript {
|
|||||||
//remove the CWD from the args
|
//remove the CWD from the args
|
||||||
args = args.splice(0,args.length-1);
|
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);
|
var local_command = process_command(args);
|
||||||
|
|
||||||
@@ -162,6 +157,7 @@ class RunScript {
|
|||||||
Sys.println(" commands : ");
|
Sys.println(" commands : ");
|
||||||
Sys.println("\ttest <target> \n\t Build and run");
|
Sys.println("\ttest <target> \n\t Build and run");
|
||||||
Sys.println("\tbuild <target> \n\t Build");
|
Sys.println("\tbuild <target> \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
|
#if pathtools
|
||||||
Sys.println("\tcreate <sample> <?name> \n\t Create a copy of <sample> inside present working directory");
|
Sys.println("\tcreate <sample> <?name> \n\t Create a copy of <sample> inside present working directory");
|
||||||
|
|||||||
Reference in New Issue
Block a user