diff --git a/haxetool/haxe.js b/haxetool/haxe.js index 11a8474..61ae536 100755 --- a/haxetool/haxe.js +++ b/haxetool/haxe.js @@ -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'))); diff --git a/package.json b/package.json index 0cd208c..944c05b 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-haxetool", - "version": "0.1.1", + "version": "0.1.2", "description": "HaXe Tool for Gulp", "main": "index.js", "dependencies": {