Fix watch command (resolves haxelime/hxp#23)

This commit is contained in:
Joshua Granick
2020-12-21 12:50:14 -08:00
parent a22d55762a
commit 79e21c8312
9 changed files with 81 additions and 17 deletions

View File

@@ -108,7 +108,7 @@ class FlashPlatform extends PlatformTarget
return context;
}
private function getDisplayHXML():String
private function getDisplayHXML():HXML
{
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
@@ -263,7 +263,15 @@ class FlashPlatform extends PlatformTarget
}*/
public override function watch():Void
{
var dirs = []; // WatchHelper.processHXML (getDisplayHXML (), project.app.path);
var hxml = getDisplayHXML();
var dirs = hxml.getClassPaths(true);
var outputPath = Path.combine(Sys.getCwd(), project.app.path);
dirs = dirs.filter(function(dir)
{
return (!Path.startsWith(dir, outputPath));
});
var command = ProjectHelper.getCurrentCommand();
System.watch(command, dirs);
}