exporting classes fully qualified - 2nd attempt
This commit is contained in:
+15
-8
@@ -24,7 +24,6 @@ class RunScript {
|
|||||||
Sys.setCwd(workingDirectory);
|
Sys.setCwd(workingDirectory);
|
||||||
} catch (e:Dynamic) {
|
} catch (e:Dynamic) {
|
||||||
error("Failed to set current working directory to [" + workingDirectory + "]");
|
error("Failed to set current working directory to [" + workingDirectory + "]");
|
||||||
Sys.exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
@@ -71,13 +70,21 @@ class RunScript {
|
|||||||
interp.variables.set("StringTools", StringTools);
|
interp.variables.set("StringTools", StringTools);
|
||||||
interp.variables.set("Sys", Sys);
|
interp.variables.set("Sys", Sys);
|
||||||
interp.variables.set("Xml", Xml);
|
interp.variables.set("Xml", Xml);
|
||||||
interp.variables.set("sys.FileSystem", sys.FileSystem);
|
interp.variables.set("sys", {
|
||||||
interp.variables.set("sys.io.File", sys.io.File);
|
"FileSystem": sys.FileSystem,
|
||||||
interp.variables.set("sys.net.Host", sys.net.Host);
|
"io": {
|
||||||
interp.variables.set("haxe.Json", haxe.Json);
|
"File": sys.io.File
|
||||||
interp.variables.set("haxe.Http", haxe.Http);
|
},
|
||||||
interp.variables.set("haxe.Serializer", haxe.Serializer);
|
"net": {
|
||||||
interp.variables.set("haxe.Unserializer", haxe.Unserializer);
|
"Host": sys.net.Host
|
||||||
|
}
|
||||||
|
});
|
||||||
|
interp.variables.set("haxe", {
|
||||||
|
"Json": haxe.Json,
|
||||||
|
"Http": haxe.Http,
|
||||||
|
"Serializer": haxe.Serializer,
|
||||||
|
"Unserializer": haxe.Unserializer
|
||||||
|
});
|
||||||
|
|
||||||
info(interp.execute(program));
|
info(interp.execute(program));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user