MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / createReExportFile

Function createReExportFile

tools/scripts/generate-tns-compat.ts:79–92  ·  view source on GitHub ↗
(pathNoExt: string, ext: '.ts' | '.d.ts')

Source from the content-addressed store, hash-verified

77}
78
79function 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
94function ensureDirectoryExistence(filePath: string) {
95 const dirname = path.dirname(filePath);

Callers 4

processPackageJsonFileFunction · 0.85
processDefinitionFileFunction · 0.85
processTypeScriptFileFunction · 0.85

Calls 4

ensureDirectoryExistenceFunction · 0.85
logFileCreatedFunction · 0.85
joinMethod · 0.80
includesMethod · 0.80

Tested by

no test coverage detected