+9
-7
@@ -100,11 +100,13 @@ export class Haxe extends Sdk {
|
||||
|
||||
haxe(args: any) {
|
||||
this.activate();
|
||||
this.log.d("_haxe_ *%s*", args.join(" "));
|
||||
return exec(".", [this.haxeBin].concat(args).join(" "));
|
||||
}
|
||||
|
||||
haxelib(args: any) {
|
||||
this.activate();
|
||||
this.log.d("_haxelib_ *%s*", args.join(" "));
|
||||
return exec(".", [this.haxelibBin].concat(args).join(" "));
|
||||
}
|
||||
|
||||
@@ -201,17 +203,17 @@ export class Haxe extends Sdk {
|
||||
}
|
||||
|
||||
install(packages: Record<string, string> | LibDef[]) {
|
||||
this.activate();
|
||||
let promise = this.haxelib(["setup", path.join(this.path, "lib")]);
|
||||
const next = (args: any) => () => {
|
||||
this.log.i("_haxelib_ _install_ *%s:%s*", args[1], args[2]);
|
||||
return this.haxelib(args);
|
||||
};
|
||||
|
||||
if (!Array.isArray(packages)) {
|
||||
packages = Object.entries(packages).map(([k, v]) => ({ name: k, version: v }));
|
||||
}
|
||||
|
||||
this.log.i("_install_ *%s*", packages.map((item) => `${item.name}:${item.version}`).join(" "));
|
||||
this.activate();
|
||||
let promise = this.haxelib(["setup", path.join(this.path, "lib")]);
|
||||
const next = (args: any) => () => {
|
||||
return this.haxelib(args);
|
||||
};
|
||||
|
||||
for (let pack of packages) {
|
||||
const args = [];
|
||||
let version = null;
|
||||
|
||||
Reference in New Issue
Block a user