@@ -43,7 +43,7 @@ const deleteDistFolders = () => {
4343 }
4444
4545 log . info ( "Deleting 'dist' folders in 'packages/pluggableWidgets/*'..." ) ;
46- const distFolderPath = path . join ( __dirname , ".." , "packages" , "pluggableWidgets" ) ;
46+ const distFolderPath = path . join ( __dirname , ".." , ".." , " packages", "pluggableWidgets" ) ;
4747 fs . readdir ( distFolderPath , { withFileTypes : true } , ( err , files ) => {
4848 if ( err ) {
4949 log . error ( `Error reading directories: ${ err } ` ) ;
@@ -101,8 +101,11 @@ const runYarnBuild = () => {
101101const copyMPKFiles = ( ) => {
102102 return new Promise ( ( resolve , reject ) => {
103103 log . info ( "Copying '.mpk' files to 'dist/pluggableWidgets'..." ) ;
104- const widgetsFolderPath = path . join ( __dirname , ".." , "packages" , "pluggableWidgets" ) ;
105- const destinationFolderPath = path . join ( __dirname , ".." , "dist" , "pluggableWidgets" ) ;
104+ const widgetsFolderPath = path . join ( __dirname , ".." , ".." , "packages" , "pluggableWidgets" ) ;
105+ const destinationFolderPath = path . join ( __dirname , ".." , ".." , "dist" , "pluggableWidgets" ) ;
106+
107+ console . log ( "widgetsFolderPath" , widgetsFolderPath ) ;
108+ console . log ( "destinationFolderPath" , destinationFolderPath ) ;
106109
107110 if ( ! fs . existsSync ( destinationFolderPath ) ) {
108111 fs . mkdirSync ( destinationFolderPath , { recursive : true } ) ;
@@ -138,10 +141,8 @@ const copyMPKFiles = () => {
138141 files . forEach ( file => {
139142 if ( path . extname ( file ) === ".mpk" ) {
140143 const sourceFile = path . join ( mpkFolderPath , file ) ;
141- const destinationFile = path . join (
142- destinationFolderPath ,
143- widget . name + "_" + file
144- ) ;
144+ const destinationFile = path . join ( destinationFolderPath , file ) ;
145+
145146 fs . copyFileSync ( sourceFile , destinationFile ) ;
146147 log . success (
147148 `Copied '${ widget . name } /${ file } ' to 'dist/pluggableWidgets'`
0 commit comments