[haxe] change build dir from tmp to current

This commit is contained in:
2019-10-23 16:00:15 +03:00
parent cc2c4f19f8
commit d3e5ffab84
2 changed files with 9 additions and 3 deletions

View File

@@ -81,10 +81,16 @@ class Haxe extends Sdk {
return exec('.', [this.haxelibBin].concat(args).join(' '));
}
resolveBuildDir(config) {
//const baseDir = os.tmpdir();
const baseDir = process.cwd();
return path.join(baseDir, 'build', config.name);
}
openfl(command, platform, config, debug=false) {
this.log.i('_openfl_ _build_ *%s*', platform);
this.activate();
const buildDir = path.join(os.tmpdir(), 'build', config.name);
const buildDir = this.resolveBuildDir(config);
fse.ensureDirSync(buildDir);
const projectTemplate = template(fs.readFileSync(path.resolve(__dirname, '..', 'template/project.xml')));
@@ -116,7 +122,7 @@ class Haxe extends Sdk {
build(platform, config, debug=false) {
this.log.i('_build_ *%s*', platform);
this.activate();
const buildDir = path.join(os.tmpdir(), 'build', config.name);
const buildDir = this.resolveBuildDir(config);
fse.ensureDirSync(buildDir);
const projectTemplate = template(fs.readFileSync(path.resolve(__dirname, '..', 'template/project.hxml')));