diff --git a/run.n b/run.n new file mode 100644 index 000000000..c24848933 Binary files /dev/null and b/run.n differ diff --git a/script/build.hxml b/script/build.hxml new file mode 100644 index 000000000..e96edb288 --- /dev/null +++ b/script/build.hxml @@ -0,0 +1,4 @@ +-main RunScript +-neko ../run.n +-lib openfl-tools +-cp src \ No newline at end of file diff --git a/script/src/RunScript.hx b/script/src/RunScript.hx new file mode 100644 index 000000000..5d0dcbf02 --- /dev/null +++ b/script/src/RunScript.hx @@ -0,0 +1,26 @@ +import haxe.io.Eof; +import haxe.Http; +import haxe.io.Path; +import haxe.Json; +import neko.Lib; +import sys.io.File; +import sys.io.Process; +import sys.FileSystem; + + +class RunScript { + public static function main() { + //take all args and forward them to build tools + var args = Sys.args(); + //get the current folder + var cwd = args[args.length-1]; + //remove it from the used args + args = args.splice(0,args.length-1); + //make a full command line + var full_args = [ "run", "openfl-tools" ].concat(args); + //enforce the folder to the current on + Sys.setCwd(cwd); + //and then execute + Sys.command("haxelib", full_args); + } +}