Fix absolute path for NPM builds on generated source directories

This commit is contained in:
Joshua Granick
2019-08-20 10:54:35 -07:00
parent b30f4bf39c
commit 18c7b93717

View File

@@ -296,9 +296,15 @@ class HTML5Platform extends PlatformTarget
if (npm)
{
var path;
for (i in 0...project.sources.length)
{
project.sources[i] = Path.tryFullPath(project.sources[i]);
path = project.sources[i];
if (StringTools.startsWith(path, targetDirectory) && !FileSystem.exists(Path.directory(path)))
{
System.mkdir(Path.directory(path));
}
project.sources[i] = Path.tryFullPath(path);
}
}