(pathNoExt: string, ext: '.ts' | '.d.ts')
| 77 | } |
| 78 | |
| 79 | function createReExportFile(pathNoExt: string, ext: '.ts' | '.d.ts') { |
| 80 | const outputFile = path.join(outputFolder, pathNoExt + ext); |
| 81 | if (!fs.existsSync(outputFile)) { |
| 82 | ensureDirectoryExistence(outputFile); |
| 83 | let content = `export * from "@nativescript/core/${pathNoExt}";`; |
| 84 | if (modulesWithDefaultExports.includes(pathNoExt)) { |
| 85 | content = `import defExport from "@nativescript/core/${pathNoExt}";\n`; |
| 86 | content += `export default defExport;`; |
| 87 | } |
| 88 | |
| 89 | fs.writeFileSync(outputFile, content); |
| 90 | logFileCreated(outputFile); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | function ensureDirectoryExistence(filePath: string) { |
| 95 | const dirname = path.dirname(filePath); |
no test coverage detected