-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is dts2hx support folder batch gen? #109
Comments
current I have to use this tool to generate external. package tools;
import haxe.Timer;
import haxe.io.Path;
import sys.FileSystem;
class GenDts2hxFiles {
static var output = "npx dts2hx ";
public static function main() {
var folrder = "node_modules/@types/three/examples/jsm/";
genJSM(folrder);
// trace(output);
}
public static function genJSM(path:String) {
var arr:Array<String> = FileSystem.readDirectory(path);
for (c in arr) {
var tPath1:String = Path.join([path, c]);
if (FileSystem.isDirectory(tPath1)) {
genJSM(tPath1);
} else {
// trace(tPath1);
var index = tPath1.lastIndexOf("/three");
final process = new sys.io.Process("npx dts2hx " + Path.withoutExtension(Path.withoutExtension(tPath1.substring(index + 1))));
if (process.exitCode() != 0) {
trace("Error running process command");
}
final lastCommitInfo = process.stdout.readLine();
trace(lastCommitInfo);
process.close();
}
}
}
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is dts2hx support folder batch gen?
current I have to use a command-line like these, but this cmd is too long to excute.
Is dts2hx support folder batch gen?
The text was updated successfully, but these errors were encountered: