Open sonygod opened 2 years ago
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();
}
}
}
}
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?