build(broccoli): traceur plugin should react only to .js/.es6/.cjs file removal
This commit is contained in:
parent
8c15ccecd1
commit
3f36a3c119
|
@ -44,9 +44,12 @@ class DiffingTraceurCompiler implements DiffingBroccoliPlugin {
|
||||||
});
|
});
|
||||||
|
|
||||||
treeDiff.removedPaths.forEach((removedFilePath) => {
|
treeDiff.removedPaths.forEach((removedFilePath) => {
|
||||||
var destFilepath = removedFilePath.replace(/\.\w+$/, this.options.destExtension);
|
var extension = path.extname(removedFilePath).toLowerCase();
|
||||||
var absoluteOuputFilePath = path.join(this.cachePath, destFilepath);
|
if (extension === '.js' || extension === '.es6' || extension === '.cjs') {
|
||||||
fs.unlinkSync(absoluteOuputFilePath);
|
var destFilepath = removedFilePath.replace(/\.\w+$/, this.options.destExtension);
|
||||||
|
var absoluteOuputFilePath = path.join(this.cachePath, destFilepath);
|
||||||
|
fs.unlinkSync(absoluteOuputFilePath);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue