| 134 | }; |
| 135 | |
| 136 | const postProcess = async (tempPath, destinationPath, webpackStatsFilePath) => { |
| 137 | const unpackedSourcePath = join(tempPath, 'zip'); |
| 138 | const packedSourcePath = join(tempPath, 'ReactDevTools.zip'); |
| 139 | const packedDestPath = join(destinationPath, 'ReactDevTools.zip'); |
| 140 | const unpackedDestPath = join(destinationPath, 'unpacked'); |
| 141 | |
| 142 | await move(unpackedSourcePath, unpackedDestPath); // Copy built files to destination |
| 143 | await move(packedSourcePath, packedDestPath); // Copy built files to destination |
| 144 | if (webpackStatsFilePath !== null) { |
| 145 | await move( |
| 146 | webpackStatsFilePath, |
| 147 | join(destinationPath, basename(webpackStatsFilePath)), |
| 148 | ); |
| 149 | } else { |
| 150 | console.log('No webpack-stats.json file was generated.'); |
| 151 | } |
| 152 | await remove(tempPath); // Clean up temp directory and files |
| 153 | }; |
| 154 | |
| 155 | const SUPPORTED_BUILDS = ['chrome', 'firefox', 'edge']; |
| 156 | |