Fix PNG file copy for CLI build --watch command (#661)

This commit is contained in:
Iván Ovejero 2020-06-12 10:28:40 -03:00 committed by GitHub
parent 6a3f075612
commit 002437862d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,10 +105,10 @@ export async function buildFiles (options?: IBuildOptions): Promise<string> {
}
return new Promise((resolve, reject) => {
copyfiles([join(process.cwd(), './*.png'), outputDirectory], { up: true }, () => resolve(outputDirectory));
buildProcess.on('exit', code => {
// Remove the tmp tsconfig file
tsconfigData.cleanup();
copyfiles([join(process.cwd(), './*.png'), outputDirectory], { up: true }, () => resolve(outputDirectory));
});
});
}