@@ -291,13 +291,14 @@ const createComponentCode = async(
291
291
}
292
292
};
293
293
294
- const createAssetFile = async (targetLocation : string , assetLocation : string | unknown ) => {
295
- // @ts-ignore
296
- let saved = remote .nativeImage .createFromPath (assetLocation );
297
- let urlData = saved .toPNG ();
298
- // fs.writeFileSync(targetLocation + ".png", urlData);
299
- await writeFile (targetLocation + " .png" , urlData );
300
- };
294
+
295
+ // const createAssetFile = async (targetLocation: string, assetLocation: string | unknown) => {
296
+ // // @ts-ignore
297
+ // let saved = remote.nativeImage.createFromPath(assetLocation);
298
+ // let urlData = saved.toPNG();
299
+ // // fs.writeFileSync(targetLocation + ".png", urlData);
300
+ // await writeFile(targetLocation + ".png", urlData);
301
+ // };
301
302
302
303
const writeTemplateTag = (componentName : string ) => {
303
304
const htmlElementMap: HtmlElementMap = {
@@ -1339,15 +1340,15 @@ const exportFile = async (data: string) => {
1339
1340
// exports images to the /assets folder
1340
1341
// eslint-disable-next-line no-unused-vars
1341
1342
console .log (' finished all the create funcs blocks and about to start loop' )
1342
- for (let [routeImage, imageLocation] of Object .entries (imagePath .value )) {
1343
- if (imageLocation !== " " ) {
1344
- await createAssetFile (
1345
- // path.join(data, "src", "assets", routeImage),
1346
- await pathJoin (data , " src" , " assets" , routeImage ),
1347
- imageLocation
1348
- );
1349
- }
1350
- }
1343
+ // for (let [routeImage, imageLocation] of Object.entries(imagePath.value)) {
1344
+ // if (imageLocation !== "") {
1345
+ // await createAssetFile(
1346
+ // // path.join(data, "src", "assets", routeImage),
1347
+ // await pathJoin(data, "src", "assets", routeImage),
1348
+ // imageLocation
1349
+ // );
1350
+ // }
1351
+ // }
1351
1352
console .log (' finished loop' )
1352
1353
// main logic below for creating components
1353
1354
await createRouter (data );
0 commit comments