build(broccoli-typescript): check for map files before deleting them

fixes #5610
Closes #6065
This commit is contained in:
Victor Berchet 2015-12-21 14:41:18 -08:00
parent cab69f689f
commit 8516473340
1 changed files with 4 additions and 1 deletions

View File

@ -212,7 +212,10 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
if (fs.existsSync(absoluteJsFilePath)) { if (fs.existsSync(absoluteJsFilePath)) {
fs.unlinkSync(absoluteJsFilePath); fs.unlinkSync(absoluteJsFilePath);
if (fs.existsSync(absoluteMapFilePath)) {
// source map could be inline or not generated
fs.unlinkSync(absoluteMapFilePath); fs.unlinkSync(absoluteMapFilePath);
}
fs.unlinkSync(absoluteDtsFilePath); fs.unlinkSync(absoluteDtsFilePath);
} }
} }