(files: File[])
| 469 | } |
| 470 | |
| 471 | addInputFiles(files: File[]) { |
| 472 | files.forEach(file => { |
| 473 | this.checkSourceAndTargetPaths(file); |
| 474 | |
| 475 | // Note: this absolute path may not necessarily exist on the file |
| 476 | // system, but any import statements or require calls in file.data |
| 477 | // will be interpreted relative to this path, so it needs to be |
| 478 | // something plausible. #6411 #6383 |
| 479 | file.absPath = pathJoin(this.sourceRoot, file.sourcePath); |
| 480 | |
| 481 | // This property can have values false, true, "dynamic" (which |
| 482 | // indicates that the file has been imported, but only dynamically). |
| 483 | file.imported = false; |
| 484 | |
| 485 | file.absModuleId = file.absModuleId || |
| 486 | this.getAbsModuleId(file.absPath); |
| 487 | |
| 488 | if (! this.addFile(file.absPath, file)) { |
| 489 | // Collisions can happen if a compiler plugin calls addJavaScript |
| 490 | // multiple times with the same sourcePath. #6422 |
| 491 | this.combineFiles(this.getFile(file.absPath)!, file); |
| 492 | } |
| 493 | |
| 494 | this.addFileByRealPath(file, this.realPath(file.absPath)); |
| 495 | }); |
| 496 | |
| 497 | return this; |
| 498 | } |
| 499 | |
| 500 | private addFileByRealPath(file: File, realPath: string) { |
| 501 | if (! has(this.realPathToFiles, realPath)) { |
no test coverage detected