File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ function updateExportStatements(directoryPath: string) {
67
67
const index = contents . find (
68
68
( filePath ) => fs . statSync ( filePath ) . isFile ( ) && path . basename ( filePath ) === "index.ts" ,
69
69
) ;
70
- if ( ! index || ! fs . statSync ( index ) . isFile ( ) || path . basename ( index ) !== "index.ts" ) return ;
70
+ if ( ! index || ! fs . statSync ( index ) . isFile ( ) || path . basename ( index ) !== "index.ts" ) {
71
+ console . log ( "No index.ts file found in" , directoryPath ) ;
72
+ return ;
73
+ }
71
74
72
75
// Only update index.ts exports directly
73
76
let fileContent = fs . readFileSync ( index , "utf8" ) ;
@@ -89,8 +92,13 @@ function identifyWorkspaces(directoryPath: string) {
89
92
const packageFile = fs . readFileSync ( path . join ( directoryPath , "package.json" ) , "utf8" ) ;
90
93
const packageJson = JSON . parse ( packageFile ) ;
91
94
for ( const ws of packageJson . workspaces ) {
95
+ console . log ( "Working on" , ws ) ;
92
96
updateExportStatements ( path . join ( directoryPath , ws , "src" ) ) ;
93
97
}
94
98
}
95
99
96
- identifyWorkspaces ( "/home/ben/connect-sdk" ) ;
100
+ function rootDir ( ) : string {
101
+ return path . join ( __dirname ) ;
102
+ }
103
+
104
+ identifyWorkspaces ( rootDir ( ) ) ;
You can’t perform that action at this time.
0 commit comments