Fix watch command (resolves haxelime/hxp#23)
This commit is contained in:
@@ -215,7 +215,7 @@ class AndroidPlatform extends PlatformTarget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -520,7 +520,15 @@ class AndroidPlatform extends PlatformTarget
|
|||||||
|
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class EmscriptenPlatform extends PlatformTarget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class FlashPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -263,7 +263,15 @@ class FlashPlatform extends PlatformTarget
|
|||||||
}*/
|
}*/
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class HTML5Platform extends PlatformTarget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -502,7 +502,15 @@ class HTML5Platform extends PlatformTarget
|
|||||||
{
|
{
|
||||||
// TODO: Use a custom live reload HTTP server for test/run instead
|
// TODO: Use a custom live reload HTTP server for test/run instead
|
||||||
|
|
||||||
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ class IOSPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/" + project.app.file + "/haxe/Build.hxml";
|
var path = targetDirectory + "/" + project.app.file + "/haxe/Build.hxml";
|
||||||
|
|
||||||
@@ -813,7 +813,15 @@ class IOSPlatform extends PlatformTarget
|
|||||||
}*/
|
}*/
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ class LinuxPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -445,7 +445,15 @@ class LinuxPlatform extends PlatformTarget
|
|||||||
|
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ class MacPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -413,7 +413,15 @@ class MacPlatform extends PlatformTarget
|
|||||||
|
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ class TVOSPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/" + project.app.file + "/haxe/Build.hxml";
|
var path = targetDirectory + "/" + project.app.file + "/haxe/Build.hxml";
|
||||||
|
|
||||||
@@ -612,7 +612,15 @@ class TVOSPlatform extends PlatformTarget
|
|||||||
}*/
|
}*/
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ class WindowsPlatform extends PlatformTarget
|
|||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDisplayHXML():String
|
private function getDisplayHXML():HXML
|
||||||
{
|
{
|
||||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||||
|
|
||||||
@@ -1014,7 +1014,15 @@ class WindowsPlatform extends PlatformTarget
|
|||||||
|
|
||||||
public override function watch():Void
|
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();
|
var command = ProjectHelper.getCurrentCommand();
|
||||||
System.watch(command, dirs);
|
System.watch(command, dirs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user