File tree Expand file tree Collapse file tree 3 files changed +257
-1
lines changed Expand file tree Collapse file tree 3 files changed +257
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,13 @@ function processDefinitionFile(entry: EntryInfo) {
8181 }
8282}
8383
84+ function processTypeScriptFile ( entry : EntryInfo ) {
85+ const relativeFilePathNoExt = entry . path . replace ( / \. t s $ / , "" ) ;
86+
87+ createReExportFile ( relativeFilePathNoExt , ".ts" ) ;
88+ addTestImport ( relativeFilePathNoExt ) ;
89+ }
90+
8491function createReExportFile ( pathNoExt : string , ext : ".ts" | ".d.ts" ) {
8592 const outputFile = path . join ( outputFolder , pathNoExt + ext ) ;
8693 if ( ! fs . existsSync ( outputFile ) ) {
@@ -162,6 +169,11 @@ function generateExportsForPrivateModules() {
162169 // * .ts file with re-exports for the corresponding ts/js file (is such exists)
163170 await traverseInputDir ( [ "*.d.ts" ] , processDefinitionFile ) ;
164171
172+ console . log ( " ------> GENERATING FILES FROM TYPESCRIPT" ) ;
173+ // Traverse all ts files which are not platform specific and create
174+ // * .ts file with re-exports for the corresponding ts file
175+ await traverseInputDir ( [ "*(?<!\.(d|android|ios)).ts" ] , processTypeScriptFile ) ;
176+
165177 generateExportsForPrivateModules ( ) ;
166178
167179 // Generate tests in
You can’t perform that action at this time.
0 commit comments