From 1639617fdf0f83c0b6c8275924259848d6817301 Mon Sep 17 00:00:00 2001 From: Christopher Dosin Date: Mon, 28 Jun 2021 11:12:53 +0300 Subject: [PATCH] fixed generation of index.js files for blocks --- src/Command/GenerateCmsBlock.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Command/GenerateCmsBlock.php b/src/Command/GenerateCmsBlock.php index 06e71b8..2a951ed 100644 --- a/src/Command/GenerateCmsBlock.php +++ b/src/Command/GenerateCmsBlock.php @@ -146,7 +146,7 @@ private function buildCmsBlock(string $blockName, string $pluginName, string $bl } if (strpos($file->getFilename(), 'index')) { - file_put_contents($blockFolderPath . '/' . $type . '/sw-cms-block-'. $type . '-' . $blockName .'.js', $fileContent); + file_put_contents($blockFolderPath . '/' . $type . '/index.js', $fileContent); } } } @@ -181,7 +181,7 @@ public function buildStorefrontBlock(string $blockName, string $pluginName, stri } // Move the generated file to the correct folder path - file_put_contents($templateFolderPath . '/cms-block-' . $blockCategory . '-' . $blockName . '.html.twig', $storefrontTemplate); + file_put_contents($templateFolderPath . '/cms-block-' . $blockName . '.html.twig', $storefrontTemplate); } /**