Usage of path.join in getOutputSourceMapPath

This commit is contained in:
sanex
2020-10-06 16:04:55 +03:00
parent ba362d1301
commit 896c5405d3
4 changed files with 25 additions and 36105 deletions
+17 -17
View File
File diff suppressed because one or more lines are too long
+1 -18383
View File
File diff suppressed because one or more lines are too long
+1 -17702
View File
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -80,9 +80,12 @@ export class ObfuscatedCodeWriter {
*/
public getOutputSourceMapPath (outputCodePath: string, sourceMapFileName: string = ''): string {
if (sourceMapFileName) {
outputCodePath = `${outputCodePath.substring(
0, outputCodePath.lastIndexOf('/')
)}/${sourceMapFileName}`;
const sourceMapPath: string = outputCodePath.substring(
0,
outputCodePath.lastIndexOf(path.sep)
);
outputCodePath = path.join(sourceMapPath, sourceMapFileName);
}
if (!/\.js\.map$/.test(outputCodePath)) {